Bug in select to_char(now(), 'YYYY/MM/DD HH24:MI:SS:MS')

Started by Pierre Le Mouëllicalmost 18 years ago2 messagesbugs
Jump to latest
#1Pierre Le Mouëllic
pierre.lemouellic@xgs-france.com

Hi,

Sometimes, when we run the SQL request :

select to_char(now(), 'YYYY/MM/DD HH24:MI:SS:MS')

we've got the result :

2008/06/11 15:01:06:1000

instead of :

2008/06/11 15:01:07:000

Our version of postgres is PostgreSQL 8.2.6 64-bit on
i386-pc-solaris2.10, compiled by /ws/on10-tools/SUNWspro/SS11/bin/cc -Xa

Thanks for your prompt answer.

Pierre Le Mou�llic

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Pierre Le Mouëllic (#1)
Re: Bug in select to_char(now(), 'YYYY/MM/DD HH24:MI:SS:MS')

=?ISO-8859-1?Q?Pierre_Le_Mou=EBllic?= <pierre.lemouellic@xgs-france.com> writes:

Sometimes, when we run the SQL request :
select to_char(now(), 'YYYY/MM/DD HH24:MI:SS:MS')
we've got the result :
2008/06/11 15:01:06:1000

This is fixed in 8.3 and up:
http://archives.postgresql.org/pgsql-committers/2007-02/msg00334.php

It was not back-patched because it could change the behavior in cases
that weren't clearly errors.

regards, tom lane