Re: RfD: more powerful "any" types
От | Pavel Stehule |
---|---|
Тема | Re: RfD: more powerful "any" types |
Дата | |
Msg-id | 162867790909101052w4ad4ebd2n59aae43a1d12fdd4@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: RfD: more powerful "any" types (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: RfD: more powerful "any" types
|
Список | 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 по дате отправления: