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