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

From Robert Haas
Subject Re: WIP: Allow SQL-language functions to reference parameters by parameter name
Date
Msg-id 42265A7F-5F79-4669-87F8-45089C3E4492@gmail.com
Whole thread Raw
In response to Re: WIP: Allow SQL-language functions to reference parameters by parameter name  (Joshua Berkus <josh@agliodbs.com>)
Responses Re: WIP: Allow SQL-language functions to reference parameters by parameter name
resolving SQL ambiguity (was Re: WIP: Allow SQL-lang funcs to ref params by param name)
List pgsql-hackers
On Mar 25, 2011, at 9:22 PM, Joshua Berkus <josh@agliodbs.com> wrote:
> Tom,
>
>> Personally I'd vote for *not* having any such dangerous semantics as
>> that. We should have learned better by now from plpgsql experience.
>> I think the best idea is to throw error for ambiguous references,
>> period.
>
> As a likely heavy user of this feature, I agree with Tom here.  I really don't want the column being silently
preferredin SQL functions, when PL/pgSQL functions are throwing an error.  I'd end up spending hours debugging this. 
>
> Also, I don't understand why this would be a dump/reload issue if $1 and $2 continue to work.
>

Because an identifier that previously referred unambiguously to a column might now be ambiguous, if there is a
parameterwith the same name. 

...Robert

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: 9.1 Beta
Next
From: Tom Lane
Date:
Subject: Re: WIP: Allow SQL-language functions to reference parameters by parameter name