From: "David E. Wheeler" on
On Mar 9, 2010, at 6:30 AM, Pavel Stehule wrote:

> this patch contains a string formatting function "format"
>
> postgres=# select format('some message: % (current user: %)',
> current_date, current_user);
> format
> ------------------------------------------------
> some message: 2010-03-09 (current user: pavel)
> (1 row)
>
> this patch add new contrib module string functions - contains mainly
> sprintf function:

Seems useful. Add it to the CommitFest so it doesn't get lost?

https://commitfest.postgresql.org/action/commitfest_view?id=6

Best,

David

--
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 David E. Wheeler <david(a)kineticode.com>:
> On Mar 9, 2010, at 6:30 AM, Pavel Stehule wrote:
>
>> this patch contains a string formatting function "format"
>>
>> postgres=# select format('some message: % (current user: %)',
>> current_date, current_user);
>>                     format
>> ------------------------------------------------
>> some message: 2010-03-09 (current user: pavel)
>> (1 row)
>>
>> this patch add new contrib module string functions - contains mainly
>> sprintf function:
>
> Seems useful. Add it to the CommitFest so it doesn't get lost?
>
>  https://commitfest.postgresql.org/action/commitfest_view?id=6


https://commitfest.postgresql.org/action/patch_view?id=287

it is there

Pavel


>
> Best,
>
> David
>

--
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: Yeb Havinga on
Pavel Stehule wrote:
> Hello
>
> this patch contains a string formatting function "format"
>
Hi Pavel,

This is supercool. Haven't tried it out yet but surely will, thanks!

Yeb Havinga



--
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: Merlin Moncure on
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?

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 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
>

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers