round - timestamp bug - Mailing list pgsql-bugs

From Gonzalo Arana
Subject round - timestamp bug
Date
Msg-id 3A6F4010.827A03@sinectis.com.ar
Whole thread Raw
Responses Re: round - timestamp bug
Re: round - timestamp bug
List pgsql-bugs
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name          : Gonzalo Arana
Your email address : garana@sinectis.com


System Configuration
---------------------
  Architecture (example: Intel Pentium)         :  Intel Pentium III

  Operating System (example: Linux 2.0.26 ELF)  :  Linux 2.2.12-20 ELF
(libc-2.1.2)

  PostgreSQL version (example: PostgreSQL-7.0):   PostgreSQL-7.0.3

  Compiler used (example:  gcc 2.8.0)           :  egcs-2.91.66


Please enter a FULL description of your problem:
------------------------------------------------


It seems that there is a problem when retrieving a timestamp value (rounding).

NO minute has 61 seconds.  Am I wrong?


Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------



radius=# create table x (x timestamp);
CREATE
radius=# insert into x (x) values ('Tue 23 Jan 21:38:59.997 2001');
INSERT 619178 1
radius=# select * from x;
                x
---------------------------------
 Tue 23 Jan 21:38:60.00 2001 ART
(1 row)


If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

Ugly patch to scripts:


radius=# select to_char(x,'Dy DD Mon HH24:MI:SS YYYY') from x;
         to_char
--------------------------
 Tue 23 Jan 21:38:59 2001
(1 row)

Of course, you'll lose the fraction of seconds otherwise are available.

pgsql-bugs by date:

Previous
From: Peter T Mount
Date:
Subject: Re: [JDBC] no way in LargeObject API to detect short read?
Next
From: aoki@acm.org (Paul M. Aoki)
Date:
Subject: Re: no way in LargeObject API to detect short read?