Re: variadic function support

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: variadic function support
Дата
Msg-id 162867790806250911r4ea5fd70y76736ed4370485b4@mail.gmail.com
обсуждение исходный текст
Ответ на Re: variadic function support  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
2008/6/25 Tom Lane <tgl@sss.pgh.pa.us>:
> "Pavel Stehule" <pavel.stehule@gmail.com> writes:
>>> Tom Lane wrote:
>>>> Your point about the syntax is good though.  It would be better if
>>>> the syntax were like
>>>> create function foo (a text, variadic b int[])
>>>> or maybe even better
>>>> create function foo (a text, variadic b int)
>
>> I don't see problem with your syntax. It well block combination OUT
>> and VARIADIC parameter - my one request, variadic parameter have to be
>> array.
>
> Well, we should certainly store the parameter type as an array in
> proargtypes, because that makes this feature transparent to all the
> PLs.  However, it doesn't follow that the CREATE FUNCTION syntax
> has to specify the array type rather than the element type.  I think
> the Java precedent might be good reason to go with using the element
> type in the function declaration.
>

I am playing with this now and two versions of proargtypes is 30% more
ugly code - mostly pg_dump and paradoxically  remove function -
because currently RemoveFuncStatement lost argmode, so I am missing
info about variadic parameter and I can't simply transformation from
element to array. I thing, it isn't good way.

Regards
Pavel Stehule

>                        regards, tom lane
>

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: variadic function support
Следующее
От: "Dickson S. Guedes"
Дата:
Сообщение: Re: TODO item: Have psql show current values for a sequence