| From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
|---|---|
| To: | Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: string function - "format" function proposal |
| Date: | 2010-09-09 11:57:41 |
| Message-ID: | AANLkTi=2hpEAYC=Ov-ZKuPmSXPXMarm-gpw04KG-V-Rz@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello
I am sending a updated version.
changes:
* tag %v removed from format function,
* proprietary tags %lq a iq removed from sprintf
* code cleaned
patch divided to two parts - format function and stringfunc (contains
sprintf function and substitute function)
Regards
Pavel Stehule
2010/9/6 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
> 2010/9/6 Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>:
>> On Mon, Sep 6, 2010 at 11:24 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> So? You'd need to quote the values anyway, in general. If you want
>>> something that will be valid SQL you'd better include the functionality
>>> of quote_literal() in it.
>>>
>>> I'm not sure that it's a good idea to have any type-specific special
>>> cases.
>>
>> As I remember, the original motivation of %v formatter is
>> some DBMSes don't like quoted numeric literals. However,
>> Postgres accepts quoted numerics, and we're developing Postgres.
>>
>> So, our consensus would be %v formatter should be removed
>> completely from the format function.
>>
>
> I think so tag that quotes all without numbers can be very useful, but
> it isn't too much important for me. I can live without them.
>
> Regards
>
> Pavel
>
>> --
>> Itagaki Takahiro
>>
>
| Attachment | Content-Type | Size |
|---|---|---|
| format.diff | text/x-patch | 9.1 KB |
| stringfunc.diff | text/x-patch | 25.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David E. Wheeler | 2010-09-09 15:58:25 | Re: returning multiple result sets from a stored procedure |
| Previous Message | Markus Wanner | 2010-09-09 08:34:42 | Re: Interruptible sleeps (was Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!) |