Skip site navigation (1) Skip section navigation (2)

BUG #4523: TO_CHAR function : the ".US" format returns incorrect value

From: "Moussard" <evelyne(dot)moussard(at)cartes-bancaires(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4523: TO_CHAR function : the ".US" format returns incorrect value
Date: 2008-11-12 15:11:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      4523
Logged by:          Moussard
Email address:      evelyne(dot)moussard(at)cartes-bancaires(dot)com
PostgreSQL version: 8.3.3
Operating system:   i686-redhat-linux-gnu
Description:        TO_CHAR function : the ".US" format returns incorrect

Using the "TO_CHAR" function, the ".US" format doesn't display the correct
value for the microseconds part of a timestamp value.

For exemple :

     DH_DEBUT        TIMESTAMP(0),
     TS_DEBUT	     TIMESTAMP(6),
     D_DEBUT         DATE        

truncate table titest;
insert into titest (ts_debut) values ('31/12/2008 23:59:58.123457');

select ts_debut from titest;

Returns the correct value : 2008-12-31 23:59:58.123457 

select to_char(ts_debut,'dd/mm/yyyy HH24:MI:SS.US') from titest;

Returns a wrong value : 31/12/2008 23:59:58.123456
(the last number is not correct : 6 instead of 7).


pgsql-bugs by date

Next:From: Hiroshi SaitoDate: 2008-11-12 16:07:26
Subject: Re: BUG #4167: When generating UUID using UUID-OSSP module, UUIDs are not unique on Windows
Previous:From: Tom LaneDate: 2008-11-12 13:48:53
Subject: Re: BUG #4522: autovacuum working send SIGUSR1 to the wrong pid

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group