fix - function call with variadic parameter for type "any"

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема fix - function call with variadic parameter for type "any"
Дата
Msg-id 162867790903300534i6add12e1x840be75db6881088@mail.gmail.com
обсуждение исходный текст
Ответы Re: fix - function call with variadic parameter for type "any"
Список pgsql-hackers
Hello,

Our implementation of variadic parameters are not complete. The
support of "any" type is incomplete. Modificator VARIADIC for funccall
parameters needs transformation from ArrayExpr to standard parameters
list.

==current behave==
postgres=# select variadic_demo2(10,'Petr',20,20,30);
NOTICE:  arg(0) = 10
NOTICE:  arg(1) = Petr
NOTICE:  arg(2) = 20
NOTICE:  arg(3) = 20
NOTICE:  arg(4) = 30
 variadic_demo2
----------------

(1 row)

Time: 3,245 ms
postgres=# select variadic_demo2(10,'Petr',20, variadic array[10,20]);
NOTICE:  arg(0) = 10
NOTICE:  arg(1) = Petr
NOTICE:  arg(2) = 20
NOTICE:  arg(3) = {10,20}
 variadic_demo2
----------------

(1 row)

==fixed behave==

Time: 1,287 ms
postgres=# select variadic_demo2(10,'Petr',20,20,30);
NOTICE:  arg(0) = 10
NOTICE:  arg(1) = Petr
NOTICE:  arg(2) = 20
NOTICE:  arg(3) = 20
NOTICE:  arg(4) = 30
 variadic_demo2
----------------

(1 row)

Time: 0,994 ms
postgres=# select variadic_demo2(10,'Petr',20, variadic array[10,20]);
NOTICE:  arg(0) = 10
NOTICE:  arg(1) = Petr
NOTICE:  arg(2) = 20
NOTICE:  arg(3) = 10
NOTICE:  arg(4) = 20
 variadic_demo2
----------------

(1 row)

regards
Pavel Stehule

Вложения

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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: PQinitSSL broken in some use casesf
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: More message encoding woes