Re: funkiness with '1999-12-31 19:00:00-05'::timestamp with time zone

From: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: funkiness with '1999-12-31 19:00:00-05'::timestamp with time zone
Date: 2010-09-03 19:12:09
Message-ID: AANLkTi=O2Jqyj5i5VSKCKsw=tGpytF4n5R2HrR88qRN_@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Sep 3, 2010 at 2:58 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Is this installation using float or integer timestamps?  If the former,
> it might be interesting to look at the subtraction result
>        ts - '1999-12-31 19:00:00-05'::timestamptz
> I'm thinking some of them might be different by submicrosecond amounts.

Ah yes, this is likely why. pg_config says CONFIGURE = ...
'--disable-integer-datetimes' ...

But I'm having trouble seeing for sure whether there are
submicrosecond parts of these timestamps. I just see a bunch of
'00:00:00' values with your query:

test=# SELECT ts - '1999-12-31 19:00:00-05'::timestamptz FROM
timestamps_test LIMIT 5;
?column?
----------
00:00:00
00:00:00
00:00:00
00:00:00
00:00:00
(5 rows)

And SELECT EXTRACT(microseconds FROM ts) FROM timestamps_test also
just gives me zeroes. Is there a way for me to see for sure?

Josh

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-09-03 19:24:45 Re: funkiness with '1999-12-31 19:00:00-05'::timestamp with time zone
Previous Message Tom Lane 2010-09-03 18:58:55 Re: funkiness with '1999-12-31 19:00:00-05'::timestamp with time zone