From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | rudolf <stu3(dot)1(at)eq(dot)cz> |
Cc: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, pgsql-docs <pgsql-docs(at)postgresql(dot)org> |
Subject: | Re: "format" function documentation fix |
Date: | 2013-09-18 19:46:48 |
Message-ID: | CAFj8pRD3cR3qEb_2gQ2T20DThP7w8SFwxyBmT91SxSHbAG_SVA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
hello
2013/9/17 rudolf <stu3(dot)1(at)eq(dot)cz>
> (Please CC me the reply, since I'm not subscribed to the list.)
>
> Dean Rasheed wrote:
>
>> On 14 September 2013 09:29, rudolf <stu3(dot)1(at)eq(dot)cz> wrote:
>>
>>> The last example from
>>> http://www.postgresql.org/**docs/9.3/static/functions-**
>>> string.html#FUNCTIONS-STRING-**FORMAT<http://www.postgresql.org/docs/9.3/static/functions-string.html#FUNCTIONS-STRING-FORMAT>
>>> - "examples using width fields and the - flag" seems to be incorrect, see
>>> the attached patch.
>>>
>>
>> No, the example is correct. Referring to the documentation above that:
>>
>> If the width argument is negative, the result is left aligned (as
>> if the - flag had been specified) ...
>>
>> This applies even if the "-" flag is also specified. So the last
>> example is meant to illustrate that 2 minuses don't make a plus here.
>>
>
> That's very unusual, IMO. This behavior follows some SQL standard or is it
> an invention of PostgreSQL?
>
>
this is postgresql feature - standard doesn't support any similar
functionality - and printf is some like developer Esperanto. We
significantly reduced complexity of printf function and we modified basic
rules for usage in SQL, but some very typical rules - like format
placeholders, we share - we don't introduce own rules there.
Regards
Pavel Stehule
> Thanks,
>
> r.
>
>
>
> --
> Sent via pgsql-docs mailing list (pgsql-docs(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/**mailpref/pgsql-docs<http://www.postgresql.org/mailpref/pgsql-docs>
>
From | Date | Subject | |
---|---|---|---|
Next Message | rudolf | 2013-09-20 08:05:02 | Re: "format" function documentation fix |
Previous Message | Dean Rasheed | 2013-09-17 10:41:15 | Re: "format" function documentation fix |