From: Pavel Stehule on 9 Mar 2010 13:45 updated version, concat function doesn't use separator Pavel 2010/3/9 Pavel Stehule <pavel.stehule(a)gmail.com>: > 2010/3/9 Merlin Moncure <mmoncure(a)gmail.com>: >> On Tue, Mar 9, 2010 at 9:30 AM, Pavel Stehule <pavel.stehule(a)gmail.com> wrote: >>> postgres=# select concat('ahaha',10,null,current_date, true); >>> Â Â Â Â concat >>> ------------------------ >>> Â ahaha,10,,2010-03-09,t >> >> why are there commas in the output? >> > > I though so comma can be default separator - but I see - it is wrong - > separator have to be empty string. > > Pavel > > >> merlin >> >
From: Merlin Moncure on 9 Mar 2010 14:30 On Tue, Mar 9, 2010 at 1:45 PM, Pavel Stehule <pavel.stehule(a)gmail.com> wrote: > updated version, concat function doesn't use separator btw...very cool stuff. I took a brief look at the sprintf implementation. The main switch: switch (pdesc.field_type) It looks like format codes we choose not to support (like %p) are silently ignored. Is this the correct behavior? merlin -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Pavel Stehule on 10 Mar 2010 02:39 2010/3/9 Merlin Moncure <mmoncure(a)gmail.com>: > On Tue, Mar 9, 2010 at 1:45 PM, Pavel Stehule <pavel.stehule(a)gmail.com> wrote: >> updated version, concat function doesn't use separator > > btw...very cool stuff. Â I took a brief look at the sprintf > implementation. Â The main switch: > switch (pdesc.field_type) > > It looks like format codes we choose not to support (like %p) are > silently ignored. Â Is this the correct behavior? it could be enhanced. sprintf is little bit baroque function and I am not able to take all details. Please, add comment with proposals for change. Pavel > > merlin > -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
First
|
Prev
|
Pages: 1 2 Prev: [HACKERS] patch (for 9.1) string functions Next: Dyamic updates of NEW with pl/pgsql |