Re: [HACKERS] Patch: Allow SQL-language functions to reference parameters by parameter name

2012-01-29 Thread Matthew Draper
On 25/01/12 18:37, Hitoshi Harada wrote: >> I'm still not sure whether to just revise (almost) all the SQL function >> examples to use parameter names, and declare them the "right" choice; as >> it's currently written, named parameters still seem rather second-class. > > Agreed. I'll try a more

Re: [HACKERS] Patch: Allow SQL-language functions to reference parameters by parameter name

2012-01-23 Thread Matthew Draper
On 19/01/12 20:28, Hitoshi Harada wrote: >> (Now it occurred to me that forgetting the #include parse_func.h might >> hit this breakage..., so I'll fix it here and continue to test, but if >> you'll fix it yourself, let me know) > > I fixed it here and it now works with my environment. Well spott

[HACKERS] Patch: Allow SQL-language functions to reference parameters by parameter name

2012-01-14 Thread Matthew Draper
I just remembered to make time to advance this from WIP to proposed patch this week... and then worked out I'm rudely dropping it into the last commitfest at the last minute. :/ Anyway, my interpretation of the previous discussion is a general consensus that permitting ambiguous parameter/column

[HACKERS] WIP: Allow SQL-language functions to reference parameters by parameter name

2011-03-25 Thread Matthew Draper
Attached is a WIP patch that allows SQL-language functions to reference their parameters by name. It uses p_post_columnref_hook, so potentially ambiguous references prefer the column... that seems to make the most sense, both because it avoids a backwards incompatibility, and it conforms with SQL