Skip site navigation (1) Skip section navigation (2)

Variadic functions and name

From: Adam Wałach <adam(dot)walach(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Variadic functions and name
Date: 2009-09-01 15:12:14
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
I am plaing with functions with variable number of arguments. I found an
example of such a function at
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 (
Syntax in this example is as follows:
 select json_object('value1' as name, 'value2' as surname);
Function declaration :

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 by date

Next:From: Victor JasonDate: 2009-09-02 06:41:14
Subject: Backup aggregate function
Previous:From: Michael WoodDate: 2009-09-01 15:11:19
Subject: Re: Problem starting pgsql server on Mac OS X. Pg_hba.conf reading permission.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group