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

timestamp format bug

From: "Roberts, Jon" <Jon(dot)Roberts(at)asurion(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: timestamp format bug
Date: 2008-01-31 15:34:30
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
select to_char(date, 'yyyy-mm-dd') as char, 
  from (select timestamp'2008-01-30 15:06:21.560' as date) sub

"2008-01-30 15:06:21.560";"2008-01-30 15:06:21.56"

Why does the timestamp field truncate the 0 but when I show the
timestamp as a character in the default timestamp format, it does not
truncate the trailing zero?  

These two fields should be consistent because they should be formatted
the same way.  I'm using versions 8.2.4 and 8.2.5 and both versions gave
me the same results.



pgsql-hackers by date

Next:From: Tom LaneDate: 2008-01-31 15:35:08
Subject: Re: BUG: type of "xxxx" does not match that when preparing the plan
Previous:From: Tom LaneDate: 2008-01-31 15:28:59
Subject: Re: Remove pg_dump -i option (was Re: Proposed patch: synchronized_scanning GUC variable)

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