Re: string function - "format" function proposal
От
Robert Haas
Тема
Re: string function - "format" function proposal
Дата
Msg-id
AANLkTik7JYQnj2Z2ns1jS6OGSqEwbkqUTLO74bBnDGNu@mail.gmail.com
Ответ на
Re: string function - "format" function proposal (Itagaki Takahiro)
Список
Дерево обсуждения
string function - "format" function proposal Pavel Stehule <pavel.stehule@gmail.com>
Re: string function - "format" function proposal Itagaki Takahiro <itagaki.takahiro@gmail.com>
Re: string function - "format" function proposal Pavel Stehule <pavel.stehule@gmail.com>
Re: string function - "format" function proposal Alvaro Herrera <alvherre@commandprompt.com>
Re: string function - "format" function proposal Pavel Stehule <pavel.stehule@gmail.com>
Re: string function - "format" function proposal Pavel Stehule <pavel.stehule@gmail.com>
Re: string function - "format" function proposal "A.M." <agentm@themactionfaction.com>
Re: string function - "format" function proposal David Fetter <david@fetter.org>
Re: string function - "format" function proposal Pavel Stehule <pavel.stehule@gmail.com>
Re: string function - "format" function proposal Itagaki Takahiro <itagaki.takahiro@gmail.com>
Re: string function - "format" function proposal Pavel Stehule <pavel.stehule@gmail.com>
Re: string function - "format" function proposal Itagaki Takahiro <itagaki.takahiro@gmail.com>
Re: string function - "format" function proposal Pavel Stehule <pavel.stehule@gmail.com>
Re: string function - "format" function proposal Tom Lane <tgl@sss.pgh.pa.us>
Re: string function - "format" function proposal Pavel Stehule <pavel.stehule@gmail.com>
Re: string function - "format" function proposal Tom Lane <tgl@sss.pgh.pa.us>
Re: string function - "format" function proposal Itagaki Takahiro <itagaki.takahiro@gmail.com>
Re: string function - "format" function proposal Tom Lane <tgl@sss.pgh.pa.us>
Re: string function - "format" function proposal Itagaki Takahiro <itagaki.takahiro@gmail.com>
Re: string function - "format" function proposal Pavel Stehule <pavel.stehule@gmail.com>
Re: string function - "format" function proposal Pavel Stehule <pavel.stehule@gmail.com>
Re: string function - "format" function proposal Itagaki Takahiro <itagaki.takahiro@gmail.com>
Re: string function - "format" function proposal Pavel Stehule <pavel.stehule@gmail.com>
Re: string function - "format" function proposal Robert Haas <robertmhaas@gmail.com>
Re: string function - "format" function proposal Itagaki Takahiro <itagaki.takahiro@gmail.com>
Re: string function - "format" function proposal Alvaro Herrera <alvherre@commandprompt.com>
Re: string function - "format" function proposal Robert Haas <robertmhaas@gmail.com>
Re: string function - "format" function proposal Pavel Stehule <pavel.stehule@gmail.com>
Re: string function - "format" function proposal Itagaki Takahiro <itagaki.takahiro@gmail.com>
Re: string function - "format" function proposal Robert Haas <robertmhaas@gmail.com>
Re: string function - "format" function proposal Andrew Dunstan <andrew@dunslane.net>
Re: string function - "format" function proposal Itagaki Takahiro <itagaki.takahiro@gmail.com>
Re: string function - "format" function proposal Pavel Stehule <pavel.stehule@gmail.com>
Re: string function - "format" function proposal Itagaki Takahiro <itagaki.takahiro@gmail.com>
Re: string function - "format" function proposal Pavel Stehule <pavel.stehule@gmail.com>
Re: string function - "format" function proposal Itagaki Takahiro <itagaki.takahiro@gmail.com>
Re: string function - "format" function proposal Robert Haas <robertmhaas@gmail.com>
Re: string function - "format" function proposal Tom Lane <tgl@sss.pgh.pa.us>
Re: string function - "format" function proposal Robert Haas <robertmhaas@gmail.com>
Re: string function - "format" function proposal Tom Lane <tgl@sss.pgh.pa.us>
Re: string function - "format" function proposal Robert Haas <robertmhaas@gmail.com>
Re: string function - "format" function proposal Itagaki Takahiro <itagaki.takahiro@gmail.com>
Re: string function - "format" function proposal Pavel Stehule <pavel.stehule@gmail.com>
Re: string function - "format" function proposal Robert Haas <robertmhaas@gmail.com>
Re: string function - "format" function proposal Pavel Stehule <pavel.stehule@gmail.com>
Re: string function - "format" function proposal Robert Haas <robertmhaas@gmail.com>
Re: string function - "format" function proposal Pavel Stehule <pavel.stehule@gmail.com>
Re: string function - "format" function proposal Pavel Stehule <pavel.stehule@gmail.com>
On Thu, Oct 14, 2010 at 2:25 AM, Itagaki Takahiro
wrote:
>> Let's make format support %s, %i, and %l, as well as
>> allowing things like %$3l (meaning, escape the third argument as a
>> literal and interpolate here), and call it good.
>
> Your idea is:
> % [ $ pos ] format -- ex. %$3l , %l
> Escapes: %% => %
>
> Just for information, $ and pos are reversed in C sprintf.
> % [ pos $ ] format -- ex. %3$l , %l
> Escapes: %% => %
Oh, woops. I intended to copy the way C works.
> IMHO, I like {} syntax as like as C# because the format strings are extensible.
> { pos [ : format ] } -- ex {3:l}, {3} (, and {l} could be also supported)
> Escapes: {{ => {, }} => }
My personal preference (and Pavel's, I guess) is to use the C-like
syntax. But I wouldn't be upset if consensus congealed around some
other option.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления
От: Itagaki Takahiro
Дата: