Re: WIP: Allow SQL-language functions to reference parameters by parameter name

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: WIP: Allow SQL-language functions to reference parameters by parameter name
Дата
Msg-id 17818.1302227930@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: WIP: Allow SQL-language functions to reference parameters by parameter name  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: WIP: Allow SQL-language functions to reference parameters by parameter name  ("David E. Wheeler" <david@kineticode.com>)
Re: WIP: Allow SQL-language functions to reference parameters by parameter name  (Robert Haas <robertmhaas@gmail.com>)
Re: WIP: Allow SQL-language functions to reference parameters by parameter name  (Andrew Dunstan <andrew@dunslane.net>)
Re: WIP: Allow SQL-language functions to reference parameters by parameter name  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Apr 5, 2011 at 5:52 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
>> That doesn't mean we should arbitrarily break compatibility with pl/sql, nor
>> that we should feel free to add on warts such as $varname that are
>> completely at odds with the style of the rest of the language. That doesn't
>> do anything except produce a mess.

> Well, what it does is avoid breaking compatibility with previous
> versions of PostgreSQL.  I think that actually does have some value.
> Otherwise, we'd be folding to upper-case by default.

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 ...
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_upgrade bug found!
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_upgrade bug found!