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

From Tom Lane
Subject Re: RfD: more powerful "any" types
Date
Msg-id 3453.1252516950@sss.pgh.pa.us
Whole thread Raw
In response to Re: RfD: more powerful "any" types  ("David E. Wheeler" <david@kineticode.com>)
Responses Re: RfD: more powerful "any" types
List pgsql-hackers
"David E. Wheeler" <david@kineticode.com> writes:
> On Sep 9, 2009, at 10:15 AM, Tom Lane wrote:
>> But here, "any" would work perfectly fine, since there's no need for
>> any two arguments to be tied to each other or the result.

> Well, only if you write your functions in C. I'd like to be able to  
> write sprintf() in PL/pgSQL. Or PL/Perl, for that matter.

I think you're confusing the point with a secondary issue, which is what
access we provide to these pseudotypes in PLs.  To write sprintf in a
PL, you'd at least need the ability to cast "any" to text.  I guess you
can do that with anyelement, though, so maybe there is nothing much here
except an overly restrictive safety check.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: RfD: more powerful "any" types
Next
From: Alvaro Herrera
Date:
Subject: Re: RfD: more powerful "any" types