Re: variadic function support

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: variadic function support
Дата
Msg-id 162867790806232230s365c88f0y3a7e8ea0ab9fffb2@mail.gmail.com
обсуждение исходный текст
Ответ на Re: variadic function support  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-patches
2008/6/23 Andrew Dunstan <andrew@dunslane.net>:
>

>
> And what about a function that takes 2 arrays as arguments?

only last argument is evaluated as variadic

so function

create or replace function foo(a int[], b int[]) ... variadic

is called
select foo(array[1,2,3], 1,2,3,4,5,6)

>
> This proposal strikes me as half-baked. Either we need proper and full
> support for variadic functions, or we don't, but I don't think we need
> syntactic sugar like the above (or maybe in this case it's really syntactic
> saccharine).

there is some functions like Oracle's least,greater, decode that needs
this feature. So I can write wrappers. For me most important are new
possibility for C procedures. All this work is related to my JSON
support proposal.

Pavel

>
> cheers
>
> andrew
>

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

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: Re: variadic function support
Следующее
От: "Pavel Stehule"
Дата:
Сообщение: Re: variadic function support