Re: string function - "format" function proposal

Andrew Dunstan <andrew@dunslane.net>

From: Andrew Dunstan <andrew@dunslane.net>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Itagaki Takahiro <itagaki.takahiro@gmail.com>, Pavel Stehule <pavel.stehule@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@commandprompt.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2010-10-14T12:50:35Z
Lists: pgsql-hackers

On 10/14/2010 08:25 AM, Robert Haas wrote:
>
>> 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.

They're both somewhat arcane. But I think the C syntax is likely to be 
more familiar to a wider group of users (including, for example, perl 
hackers) than the C# syntax, and is to be preferred on those grounds alone.

cheers

andrew