WIP: Allow SQL-language functions to reference parameters by parameter name - Mailing list pgsql-hackers

From Matthew Draper
Subject WIP: Allow SQL-language functions to reference parameters by parameter name
Date
Msg-id 4D8CEE04.9000700@trebex.net
Whole thread Raw
Responses Re: WIP: Allow SQL-language functions to reference parameters by parameter name
List pgsql-hackers
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's usual
notion of assuming you mean the "nearest" name.

It allows the parameter name to be qualified with the function name, for
when you really mean you want the parameter.


This being my first foray into the PostgreSQL source, I expect the code
is horribly wrong in a variety of ways. Other than that, the regression
tests I've been using are a slight modification of existing queries; I
imagine they should look measurably different.

And finally, conspicuously absent are the documentation changes that
will obviously need to accompany a real patch.

(This builds & passes `make check` on current HEAD, a4425e3)


Thanks!

Matthew


--
matthew@trebex.net


Attachment

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Set hint bits upon eviction from BufMgr
Next
From: Merlin Moncure
Date:
Subject: Re: Set hint bits upon eviction from BufMgr