Variadic functions and name

Поиск
Список
Период
Сортировка
От Adam Wałach
Тема Variadic functions and name
Дата
Msg-id 1f5923d40909010812j190eeebam91dda26f123283ab@mail.gmail.com
обсуждение исходный текст
Список pgsql-novice
Hi
I am plaing with functions with variable number of arguments. I found an example of such a function at http://www.depesz.com/index.php/2008/07/31/waiting-for-84-variadic-functions/.
Up to this point everything is clear, all the parameters are of the same type and function works.
But I wan't to simulate named function arguments (as in oracle funct_name (arg1 => test) - syntax is not so important). I also found another examle (http://archives.postgresql.org/pgsql-patches/2008-01/msg00103.php).
Syntax in this example is as follows:
 select json_object('value1' as name, 'value2' as surname);
Function declaration :
json_object(anyparams)

I am trying to write similar function in plpgsql but all I get is 'type anyparams does not exist'.
Is it possible?

--
Regards, Adam Wałach

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

Предыдущее
От: Michael Wood
Дата:
Сообщение: Re: Problem starting pgsql server on Mac OS X. Pg_hba.conf reading permission.
Следующее
От: Ruzsinszky Attila
Дата:
Сообщение: Modifying selected records