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

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Matthew Draper <matthew(at)trebex(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: Allow SQL-language functions to reference parameters by parameter name
Date: 2011-04-08 14:53:27
Message-ID: BANLkTik7nQodDidaY-novQKxRUv=t3nUQA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

>>
>> 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 think the discussion went off into the weeds somewhat, and I'm guilty of
> responding to suggestions that don't refer to the original subject.
>
> For SQL language functions, I think you're right. The only caveat I have is
> that if your function name is very long, having to use it as a
> disambiguating qualifier can be a bit ugly.

same mechanism works well in plpgsql and nobody requested a some
special shortcut.

Regards

Pavel

>
> cheers
>
> andrew
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2011-04-08 15:05:36 Re: WIP: Allow SQL-language functions to reference parameters by parameter name
Previous Message Andrew Dunstan 2011-04-08 14:50:19 Re: WIP: Allow SQL-language functions to reference parameters by parameter name