Re: [GENERAL] FM format modifier does not remove leading zero from year

2010-01-06 Thread Guy Rouillier
On 1/6/2010 3:29 PM, Tom Lane wrote: Guy Rouillier writes: Oracle states clearly in the SQL Reference manual: "A modifier can appear in a format model more than once. In such a case, each subsequent occurrence toggles the effects of the modifier." *Toggles* the effect of the modifier? Ega

Re: [GENERAL] FM format modifier does not remove leading zero from year

2010-01-06 Thread Tom Lane
Guy Rouillier writes: > Oracle states clearly in the SQL Reference manual: > "A modifier can appear in a format model more than once. In such a case, > each subsequent occurrence toggles the effects of the modifier." *Toggles* the effect of the modifier? Egad, what drunken idiot chose that spe

Re: [GENERAL] FM format modifier does not remove leading zero from year

2010-01-06 Thread Guy Rouillier
On 1/5/2010 10:54 AM, Tom Lane wrote: Adrian Klaver writes: From what I could see in the source code (src/backend/utils/adt/formatting.c) the year portion of the string is not run through the FM modifier. A fix would mean a patch to the above AFAIK. Should it be? Can anyone check how this w

Re: [GENERAL] FM format modifier does not remove leading zero from year

2010-01-05 Thread Tom Lane
Adrian Klaver writes: > From what I could see in the source code > (src/backend/utils/adt/formatting.c) the year portion of the string is > not run through the FM modifier. A fix would mean a patch to the above > AFAIK. Should it be? Can anyone check how this works on Oracle?

Re: [GENERAL] FM format modifier does not remove leading zero from year

2010-01-05 Thread Adrian Klaver
On Saturday 02 January 2010 10:14:07 am Andrus wrote: > Command: > > select to_char(DATE'2009-1-1','FMDD.FMMM.FMYY') > > Result observed: > > 1.1.09 > > Result expected: > > 1.1.9 > > How to fix ? > > Andrus. >From what I could see in the source code (src/backend/utils/adt/formatting.c) the year

[GENERAL] FM format modifier does not remove leading zero from year

2010-01-04 Thread Andrus
Command: select to_char(DATE'2009-1-1','FMDD.FMMM.FMYY') Result observed: 1.1.09 Result expected: 1.1.9 How to fix ? Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general