Re: RfD: more powerful "any" types
От | Pavel Stehule |
---|---|
Тема | Re: RfD: more powerful "any" types |
Дата | |
Msg-id | 162867790909101125s4a071029j29cf87d1ef61ec02@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: RfD: more powerful "any" types (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: RfD: more powerful "any" types
Re: RfD: more powerful "any" types |
Список | pgsql-hackers |
2009/9/10 Tom Lane <tgl@sss.pgh.pa.us>: > Pavel Stehule <pavel.stehule@gmail.com> writes: >>> On Sep 10, 2009, at 10:16 AM, Tom Lane wrote: >>>> I thought the idea was to >>>> provide the same power as sprintf, eg field width controls, numeric >>>> formatting options, etc. > >> no - we have to_char function, why we need different formatting system? > > Why do we need this at all, when we have the concatenation operator? what is more readable? select 'i=' || i || ', b=' || b || ', c=' || c .. or select format('i=%, b=%, c=%', i, b, c ..) > I think the point of it is that people are used to how sprintf works. > So it should work as nearly like sprintf as possible. > How sprintf will be print bytea type, or char(n) type values? I can understand, so people like some what is well known, but sprintf function is from other domain than databases. There isn't possible 100% compatible implementation - because sprintf desn't knows arrays, custom types, rows. > regards, tom lane >
В списке pgsql-hackers по дате отправления: