Re: Inconsistent behavior with TIMESTAMP WITHOUT and epoch

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Inconsistent behavior with TIMESTAMP WITHOUT and epoch
Date: 2005-01-27 17:03:55
Message-ID: 200501270903.55645.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Fuhr 2005-01-27 17:23:36 Re: 8.0.0 make check fails on Solaris 9 (sparc)
Previous Message PFC 2005-01-27 16:26:26 My postmaster just crashed !