From: Pavel Stehule on
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
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
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