Re: RfD: more powerful "any" types - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: RfD: more powerful "any" types
Date
Msg-id 20090909171157.GO4132@alvh.no-ip.org
Whole thread Raw
In response to Re: RfD: more powerful "any" types  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: RfD: more powerful "any" types
List pgsql-hackers
Tom Lane wrote:

> In an example like
> 
>     create function foo (anyelement, anyelement2, anyelement2)
>     returns anyarray2
> 
> the second and third arguments would be tied to be of the same type,
> and the result would be an array of that type; whereas the first
> argument's type is unrelated.

Another possible example is sprintf:

create function sprintf(text, anyelement, anyelement2, anyelement3, ...)
returns text

In order for this to work in general, we'd need FUNC_MAX_ARGS different
types, which is currently defined as 100 in our code.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: RfD: more powerful "any" types
Next
From: Tom Lane
Date:
Subject: Re: RfD: more powerful "any" types