Re: named parameters in SQL functions

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: named parameters in SQL functions
Дата
Msg-id 603c8f070911151923h545c9ebdwf2b262d9335a8af4@mail.gmail.com
обсуждение исходный текст
Ответ на Re: named parameters in SQL functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, Nov 15, 2009 at 10:05 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> I don't see why it would need to be a reserved word.  We're not
>> changing how it gets parsed, just what it means.  At any rate
>> "FUNCTION." is a 9-character prefix, which is rather longer than I
>> would prefer.
>
> This from the guy who likes 40-character function names?

Hrm... I think this is bikeshedding at its finest - but having said
that, thinking about what I usually do a little more, my PL/pgsql
functions tend to be either triggers, which tend to have names like
tablename_postupdate() [so around 20 characters, depending on the
length of the table name] or else they tend to be functions that
update some sort of summary statistics... like, oh, say, updating the
task table with the total amount of time worked on each task by
aggregating over a time log table.  Those functions tend to get a name
like update_task_time_worked().  That's only 23, but task is a pretty
short word, so some of them might be a bit longer than that.  So maybe
40 is an overestimate, although I probably do have a few that are
close to that long.

...Robert


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

Предыдущее
От: Itagaki Takahiro
Дата:
Сообщение: Re: Add YAML option to explain
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: Aggregate ORDER BY patch