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

Dean Rasheed <dean.a.rasheed@gmail.com>

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

Regards,
Dean