Re: named parameters in SQL functions

Поиск
Список
Период
Сортировка
От Andrew Chernow
Тема Re: named parameters in SQL functions
Дата
Msg-id 4B00B2EC.6090407@esilo.com
обсуждение исходный текст
Ответ на Re: named parameters in SQL functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: named parameters in SQL functions
Список pgsql-hackers
Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Sun, Nov 15, 2009 at 8:22 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
>>> 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.
> 
> You're only going to need that if you insist on choosing parameter names
> that conflict with columns of the tables the function manipulates.  Even
> then, attaching column aliases to the tables could be used instead.
> I don't see that this is any different from or worse than the extra
> typing you'll incur if you insist on using 40-character table names.
> 
> (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?

-- 
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Aggregate ORDER BY patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: named parameters in SQL functions