Re: named parameters in SQL functions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: named parameters in SQL functions
Date
Msg-id 28925.1258337372@sss.pgh.pa.us
Whole thread Raw
In response to Re: named parameters in SQL functions  (Andrew Chernow <ac@esilo.com>)
Responses Re: named parameters in SQL functions  (Andrew Chernow <ac@esilo.com>)
List pgsql-hackers
Andrew Chernow <ac@esilo.com> writes:
> Tom Lane wrote:
>> (But having said that, an alternate qualification name is something
>> that could be implemented if there were any agreement on what to use.)

> Would something like ARG.name be acceptable?

It all depends on how likely you think it is that the function would use
a table name or alias matching ARG (or any other proposal).

It's certainly true that the function name itself is not immune from
conflicts of that sort ... in fact I think we saw a bug report recently
from someone who had intentionally chosen a plpgsql function name equal
to a table name used in the function :-(.  So I'm not wedded to the
function name entirely.  But it has precedent in plpgsql, and that
precedent came from Oracle, so I don't think we should lightly make SQL
functions do something different.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Chernow
Date:
Subject: Re: named parameters in SQL functions
Next
From: Andrew Chernow
Date:
Subject: Re: named parameters in SQL functions