Unix Technical Forum

proposed patch for function parameters name refs

This is a discussion on proposed patch for function parameters name refs within the Pgsql Patches forums, part of the PostgreSQL category; --> This patch implements the function parameter referencing by name as discussed before. Please find the version 1.0 of this ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 07:23 AM
Gevik Babakhani
 
Posts: n/a
Default proposed patch for function parameters name refs


This patch implements the function parameter referencing by name as
discussed before.
Please find the version 1.0 of this patch at http://www.postgresql.nl/gevik/

The zip archive contains a combined and separate patches to make reviewing
easier.

How this patch is implemented:
As discussed before, a generic parser callback functionality has been
implemented
to create hooks from within the parser. The mechanism of handling refnames
acts only
when the parser is in context of parsing a function AND all of the previous
attempts to
recognize an unknown refname (also after implicit RTE) has failed. This way
the match
for a possible function parameter name is executed as a last measure.

notes:

- a new error code has been added: ERRCODE_UNDEFINED_FUNCTION_PARAMETER_NAME
- when a given refname is unrecognized after all matches, one of the two
following
error messages is shown:

a) "there is no parameter %s defined for function %s"
b) "there is no parameter %s.%s defined for function %s or this \n is
an invalid reference to FROM-clause entry for table \"%s\""

- 2 new files have been added parse_callback.h and .c
- the patch also contains test for regression
- the main logic is implemented in transformColumnRef/ case 1 and case 2
- patch is created using VC++ 2005, tested on Win32 and RH4


------------------------------------------------
Gevik Babakhani

PostgreSQL NL http://www.postgresql.nl
TrueSoftware BV http://www.truesoftware.nl
------------------------------------------------


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 07:23 AM
Bruce Momjian
 
Posts: n/a
Default Re: proposed patch for function parameters namerefs


This has been saved for the 8.4 release:

http://momjian.postgresql.org/cgi-bin/pgpatches_hold

---------------------------------------------------------------------------

Gevik Babakhani wrote:
>
> This patch implements the function parameter referencing by name as
> discussed before.
> Please find the version 1.0 of this patch at http://www.postgresql.nl/gevik/
>
> The zip archive contains a combined and separate patches to make reviewing
> easier.
>
> How this patch is implemented:
> As discussed before, a generic parser callback functionality has been
> implemented
> to create hooks from within the parser. The mechanism of handling refnames
> acts only
> when the parser is in context of parsing a function AND all of the previous
> attempts to
> recognize an unknown refname (also after implicit RTE) has failed. This way
> the match
> for a possible function parameter name is executed as a last measure.
>
> notes:
>
> - a new error code has been added: ERRCODE_UNDEFINED_FUNCTION_PARAMETER_NAME
> - when a given refname is unrecognized after all matches, one of the two
> following
> error messages is shown:
>
> a) "there is no parameter %s defined for function %s"
> b) "there is no parameter %s.%s defined for function %s or this \n is
> an invalid reference to FROM-clause entry for table \"%s\""
>
> - 2 new files have been added parse_callback.h and .c
> - the patch also contains test for regression
> - the main logic is implemented in transformColumnRef/ case 1 and case 2
> - patch is created using VC++ 2005, tested on Win32 and RH4
>
>
> ------------------------------------------------
> Gevik Babakhani
>
> PostgreSQL NL http://www.postgresql.nl
> TrueSoftware BV http://www.truesoftware.nl
> ------------------------------------------------
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly


--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:17 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com