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

From Robert Haas
Subject Re: named parameters in SQL functions
Date
Msg-id 603c8f070911151735v49c95da1mb6e854e88222ced5@mail.gmail.com
Whole thread Raw
In response to Re: named parameters in SQL functions  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: named parameters in SQL functions
List pgsql-hackers
On Sun, Nov 15, 2009 at 8:22 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
> Tom Lane wrote:
>>
>> Andrew Dunstan <andrew@dunslane.net> writes:
>>
>>>
>>> At Tom's suggestion I am looking at allowing use of parameter names in
>>> SQL functions instead of requiring use of $1 etc. That raises the question
>>> of how we would disambiguate a parameter name from a column name.
>>>
>>
>> Throw error if ambiguous.  We already resolved this in the context of
>> plpgsql.
>>
>>
>>
>
> Well, if the funcname.varname gadget will work, as you suggest elsewhere it
> could, I think that would suffice. I had assumed that was just something in
> the plpgsql engine.

That gadget isn't horribly convenient for me since my function names
tend to be 30 or 40 characters long.  I wish we had something shorter,
and maybe constant.  But I guess that's a topic for a separate
(inevitably rejected) patch.

...Robert


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Patch committers
Next
From: James Pye
Date:
Subject: Re: Python 3.1 support