Postgres (psql ?) rounds all odd second values to even seconds fo r timestamp(0) data type

From: Csaba Nagy <nagy(at)domeus(dot)de>
To: "'PGSQL (E-mail)'" <pgsql-general(at)postgresql(dot)org>
Subject: Postgres (psql ?) rounds all odd second values to even seconds fo r timestamp(0) data type
Date: 2003-01-08 09:41:20
Message-ID: 96D568DD7FAAAD428581F8B3BFD9B0F604DE9E@goldmine.ecircle.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Looks like postgres will "round" all odd second values to even seconds for
timestamp(0).
Is this a known behaviour, or it's a bug ? The data type docs say nothing
about this, searching the mail archive/Google returned no relevant result.
BTW, I'm using the 7.3b5 version.

cnagy=> select '1999-01-28 18:17:15'::timestamp(0);
timestamp
---------------------
1999-01-28 18:17:16
(1 row)

cnagy=> select '1999-01-28 00:00:01'::timestamp(0);
timestamp
---------------------
1999-01-28 00:00:02
(1 row)

The same happens for ANY date having the seconds an odd number.

Cheers,
Csaba.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lincoln Yeoh 2003-01-08 09:41:57 Re: Connection / Access / Strange Problems
Previous Message Magnus Naeslund(f) 2003-01-08 09:18:32 Re: PostgreSQL + Visual Basic .NET