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

From Merlin Moncure
Subject Re: RfD: more powerful "any" types
Date
Msg-id b42b73150909110846t15421c8ds456798b24ae4675@mail.gmail.com
Whole thread Raw
In response to Re: RfD: more powerful "any" types  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Sep 11, 2009 at 10:38 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
>> Is this really all that hard?  I'm thinking it could be implemented by
>> using the real C sprintf underneath, passing one % specifier and its
>> corresponding parameter at a time, coerced to whatever the conversion
>> specifier specifies.
>
> The only disadvantage I can see of that is that it would lose precision
> for NUMERIC.  I'd really like to be able to write "%300.100f" and have it
> Do The Right Thing with a 300-digit numeric input.

that could be simply worked around by formatting the  numeric in sql
and passing it to printf as %s.

merlin


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: COPY enhancements
Next
From: Robert Haas
Date:
Subject: Re: COPY enhancements