Re: WIP: Allow SQL-language functions to reference parameters by parameter name
David Wheeler <david@kineticode.com>
From: "David E. Wheeler" <david@kineticode.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>, Andrew Dunstan <andrew@dunslane.net>, Merlin Moncure <mmoncure@gmail.com>, Peter Eisentraut <peter_e@gmx.net>, Pavel Stehule <pavel.stehule@gmail.com>, Matthew Draper <matthew@trebex.net>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2011-04-08T03:06:14Z
Lists: pgsql-hackers
On Apr 7, 2011, at 6:58 PM, Tom Lane wrote: > Well, if we're going to consider 100% backwards compatibility a "must", > then we should just stick with what the submitted patch does, ie, > unqualified names are matched first to query columns, and to parameters > only if there's no column match. This is also per spec if I interpreted > Peter's comments correctly. The whole thread started because I > suggested that throwing an error for ambiguous cases might be a better > design in the long run, but apparently long term ease of code > maintenance is far down our list of priorities ... I agree with you that it should throw an error, at least optionally. Could we not recycle the settings that control this for plpgsql functions? Best, David