Re: RfD: more powerful "any" types

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, "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-10 17:52:14
Message-ID: 162867790909101052w4ad4ebd2n59aae43a1d12fdd4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2009/9/10 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Alvaro Herrera <alvherre(at)commandprompt(dot)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
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2009-09-10 18:00:08 Re: RfD: more powerful "any" types
Previous Message Tom Lane 2009-09-10 17:36:46 Re: RfD: more powerful "any" types