Re: function_name.parameter_name

Поиск
Список
Период
Сортировка
От Darren Duncan
Тема Re: function_name.parameter_name
Дата
Msg-id 4C880E4F.8060501@darrenduncan.net
обсуждение исходный текст
Ответ на Re: function_name.parameter_name  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: function_name.parameter_name  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Alvaro Herrera wrote:
> Excerpts from Darren Duncan's message of mié sep 08 17:41:40 -0400 2010:
> 
>> For example, if it wouldn't conflict with anything, one could use the "|" symbol 
>> (mnemonic is that means "alternation" in regular expressions) like this:
>>
>>    CREATE FUNCTION func_very_very_very_very_long_name|short_name() ...
> 
> If you can name the function short_name, why not use just that in the
> first place?

More realistic examples would be either of:

1.  Offer users the choice of a longer more self-describing name and a terser 
name.  For example: "function is_member_of|in (...) ...".

2.  Offer users the choice of similar length but different names.  For example: 
"function sum|add(x integer, y integer) returns integer ...".

3.  Make it easier to change your mind on a name while providing backwards 
compatibility for awhile.  For example: "function new_name|old_name (...) ...".

Personally I like the idea of developers not always having to be forced to 
choose among two equally good names, and making a wrapper function would be 
overkill for this feature.

-- Darren Duncan


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: function_name.parameter_name
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: function_name.parameter_name