Re: RfD: more powerful "any" types - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: RfD: more powerful "any" types
Date
Msg-id 162867790909101052w4ad4ebd2n59aae43a1d12fdd4@mail.gmail.com
Whole thread Raw
In response to Re: RfD: more powerful "any" types  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: RfD: more powerful "any" types
List pgsql-hackers
2009/9/10 Tom Lane <tgl@sss.pgh.pa.us>:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
>> alvherre=# select text_format('% was % at % and said % % times', 'Pavel'::text, 'here'::unknown, now(),
row('a','b','c'),'{42}'::int[]); 
>>                                  text_format
>> -----------------------------------------------------------------------------
>>  Pavel was here at 2009-09-10 13:12:09.054653-04 and said (a,b,c) {42} times
>> (1 fila)
>
> Is that what's being proposed?  That pretty much sucks --- it's just
> another way of concatenating some strings.  I thought the idea was to
> provide the same power as sprintf, eg field width controls, numeric
> formatting options, etc.
>

I thing so this is enough - we can get simply message text - like
raise notice statement. I thing so simple and clean function has more
usability than heavy real sprintf function. We (c coders) are old
dinosaurs - but  nobody else knows what sprintf function does.

I thing so the name only "format" is good, it's short. If you need
some other formating, just you can use to_char function.

Pavel

>                        regards, tom lane
>


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: RfD: more powerful "any" types
Next
From: Pavel Stehule
Date:
Subject: Re: RfD: more powerful "any" types