Re: Inconsistent behavior with TIMESTAMP WITHOUT and epoch - Mailing list pgsql-bugs

From Josh Berkus
Subject Re: Inconsistent behavior with TIMESTAMP WITHOUT and epoch
Date
Msg-id 200501270903.55645.josh@agliodbs.com
Whole thread Raw
In response to Re: Inconsistent behavior with TIMESTAMP WITHOUT and epoch  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Inconsistent behavior with TIMESTAMP WITHOUT and epoch  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Tom,

> I don't believe there is anything wrong here.  extract(epoch) is defined
> to produce the equivalent Unix timestamp, and that's what it's doing.
> See the thread at
> http://archives.postgresql.org/pgsql-bugs/2003-02/msg00069.php

Darn.  I missed that discussion, I'd have argued with Thomas (not that I ever
*won* such an argument ...)

The problem with the current functionality is that it makes it impossible to
get a GMT Unix timestamp out of a TIMESTAMP WITHOUT TIME ZONE without string
manipulation.   And for an application where you want the timestamps to be
location-agnostic (such as this one, with servers on east and west coasts,
and some talk about London), you want your timestamps stored as GMT.

However, having changed it in 7.3, I agree that we'll just cause trouble
changing it back.

--
Josh Berkus
Aglio Database Solutions
San Francisco

pgsql-bugs by date:

Previous
From: Tamas Vincze
Date:
Subject: 8.0.0 make check fails on Solaris 9 (sparc)
Next
From: Michael Fuhr
Date:
Subject: Re: 8.0.0 make check fails on Solaris 9 (sparc)