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

Re: Composite Types and Function Parameters

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Greg <grigorey(at)yahoo(dot)co(dot)uk>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Composite Types and Function Parameters
Date: 2010-10-25 22:52:55
Message-ID: AANLkTi=Bv+d8rEtMCZ-EqJ9i3PnNcxwf6WNvOF1oxTD7@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Mon, Oct 25, 2010 at 6:38 PM, Greg <grigorey(at)yahoo(dot)co(dot)uk> wrote:
>
> Hi Pavel, thanks! Yeah, thats what I though. I have to have a custom type or a very ugly looking solution for passing the params then.
>
> To Postgre dev. team: If anyone who involved in Postgre development reading this, just a feature suggestion: allow array that can accept combination of any data types to be passed to a function, for example:
>       // declare
>       create function TEST ( anytypearray[] ) ...
>       // calling
>       perform TEST (array[bool, int, etc.] ) ....
> This would make such a nice adition to the development for postgre. Although this may be complecated to achieve.

probably hstore would be more appropriate for something like that.
You can also declare functions taking composite arrays, anyarray,
variadic array, and variadic "any", although the latter requires
function implementation in C to get the most out of it.

merlin

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-10-25 23:12:58
Subject: Re: Composite Types and Function Parameters
Previous:From: Tom LaneDate: 2010-10-25 22:51:40
Subject: Re: Bug: citext not working in non-public schema

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