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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Odd behaviour of timestamptz


  • From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
  • To: Matteo Beccati <php(at)beccati(dot)com>
  • Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
  • Subject: Re: Odd behaviour of timestamptz
  • Date: Wed, 21 Feb 2007 17:35:40 +0900
  • Message-id: <1417AC13-8FB0-4C25-8B0E-307B80B168BC(at)seespotcode(dot)net>


On Feb 21, 2007, at 17:15 , Matteo Beccati wrote:

PostgreSQL 8.2.3 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC)
3.4.6 20060404 (Red Hat 3.4.6-3)

test=# create TABLE test (data timestamp with time zone);
CREATE TABLE

test=# INSERT into test values ('1910-01-10');
INSERT 0 1

test=# INSERT into test values ('1990-01-10');
INSERT 0 1

test=# SELECT * from test;
           data
----------------------------
1910-01-10 00:00:00+00:19:32
1990-01-10 00:00:00+01
(2 rows)

I suspect your RPMs build PostgreSQL without --enable-integer- datetimes. Without this configure flag, timestamps are represented as floats, with all of the imprecision that implies. See the second note below the Date/Time Types table:

http://www.postgresql.org/docs/8.2/interactive/datatype- datetime.html#DATATYPE-DATETIME-TABLE

Michael Glaesemann
grzm seespotcode net





Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group