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: 2007-02-21 08:35:40
Message-ID: 1417AC13-8FB0-4C25-8B0E-307B80B168BC@seespotcode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matteo Beccati 2007-02-21 08:40:05 Re: Odd behaviour of timestamptz
Previous Message Matteo Beccati 2007-02-21 08:15:58 Odd behaviour of timestamptz