Re: RfD: more powerful "any" types

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Aidan Van Dyk <aidan(at)highrise(dot)ca>, Hannu Krosing <hannu(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: RfD: more powerful "any" types
Date: 2009-09-11 03:43:50
Message-ID: 162867790909102043o778406ccs5f1136ffae5083b3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2009/9/11 Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
> Aidan Van Dyk escribió:
>
>> Just to make the task that much harder, if PostgreSQL is going to have a
>> sprintf (in core, or contrib), I *really* hope it's a real sprintf,
>> supporting everything, like:
>>    $m positional notation
>>    * width argument
>>    All the flags [#0- +'] (I as a bonus)
>>    field width . presision
>>
>> And you're going to want to make sure you support all the regular
>> conversion specifiers (d/i/o/u/x/X/e/E/f/F/g/G/p/n/c/s)...
>
> 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.

What conversion between PostgreSQL datatypes and C types? PostgreSQL
missing infrastructure for it.

Pavel
>
> The only thing that breaks this idea is the $n positional specifiers, I
> think.
>
> --
> Alvaro Herrera                                http://www.CommandPrompt.com/
> The PostgreSQL Company - Command Prompt, Inc.
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2009-09-11 06:13:50 Re: logging hook for database audit
Previous Message Alvaro Herrera 2009-09-11 03:26:50 Re: RfD: more powerful "any" types