Re: Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used

Pavel Stehule <pavel.stehule@gmail.com>

From: Pavel Stehule <pavel.stehule@gmail.com>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Stephen Frost <sfrost@snowman.net>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2013-02-13T15:19:20Z
Lists: pgsql-hackers

Attachments

Hello

2013/2/13 Dean Rasheed <dean.a.rasheed@gmail.com>:
> On 11 February 2013 14:29, Pavel Stehule <pavel.stehule@gmail.com> wrote:
>> Hello
>>
>> updated patch
>>
>> * merged Dean's doc
>> * allow NULL as width
>>
>
> Hi,
> I have not had time to look at this properly, but it doesn't look as
> though you have fixed the other problem I mentioned up-thread, with %s
> for NULL values:
>
> SELECT format('|%s|', NULL);
> Result: ||
> SELECT format('|%5s|', NULL);
> Result: ||
>
> In the second case, I think it should produce |     |.

fixed

Regards

Pavel Stehule

>
> Regards,
> Dean