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

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used
Date: 2012-12-31 12:38:29
Message-ID: CAFj8pRA3JQQfqxB-nCoV9g-N5iYJqs1051AFD19_i705db0upA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2012/12/31 Stephen Frost <sfrost(at)snowman(dot)net>:
> Pavel,
>
> * Pavel Stehule (pavel(dot)stehule(at)gmail(dot)com) wrote:
>> A result from ours previous talk was a completely disabling mixing
>> positional and ordered placeholders - like is requested by man and gcc
>> raises warnings there.
>>
>> But mixing is not explicitly disallowed in doc, and mixing was tested
>> in our regress tests. There are tests where placeholders are mixed -
>> so anybody can use it.
>> select format('Hello %s %1$s %s', 'World', 'Hello again'); -- is
>> enabled and supported and result is expected
>
> Alright, then I agree that raising a warning in that case makes sense
> and let's update the docs to reflect that it shouldn't be done (like
> what glibc/gcc do).

ok, I prepare patch

Regards

Pavel

>
> Thanks,
>
> Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2012-12-31 14:03:53 Re: Behaviour of bgworker with SIGHUP
Previous Message Stephen Frost 2012-12-31 12:27:30 Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used