Re: RfD: more powerful "any" types

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: RfD: more powerful "any" types
Date: 2009-09-09 18:00:51
Message-ID: 162867790909091100j7ef3e47dqf65b6f6fbc5e6979@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2009/9/9 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> "David E. Wheeler" <david(at)kineticode(dot)com> writes:
>> Yes, that sounds about right. Is that not basically what Alvaro was
>> looking for to start with? And is there an "any" array that could work
>> for variadic functions like sprintf(), as well?
>
> Well, no, because arrays are inherently all the same element type.
> You could try to do sprintf as
>
>        sprintf(text, variadic anyarray) returns text
>
> but this constrains all the arguments to be the same type, which is
> not what you want.  The variadic mechanism doesn't have the ability
> to deal with what you're suggesting, and I'm not sure we want to try
> to make it do that.

variadic "any" isn't transformed to array.

we are able to write sprintf(text, variadic "any") returns text, but only in C

regards
Pavel Stehule

>
>                        regards, tom lane
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2009-09-09 18:05:45 Re: RfD: more powerful "any" types
Previous Message Pavel Stehule 2009-09-09 17:58:47 Re: RfD: more powerful "any" types