Re: [BUGS] Inconsistent behavior with TIMESTAMP WITHOUT and epoch

2005-01-27 Thread Josh Berkus
Tom, > How so? If you think that the timestamp-without-zone is relative to GMT > rather than your local zone, you say something like > extract(epoch from (timestampvar AT TIME ZONE 'GMT')) Ah, that didn't seem to work before. I must have done the parens wrong. > Quite honestly, you shoul

Re: [BUGS] Inconsistent behavior with TIMESTAMP WITHOUT and epoch

2005-01-27 Thread Tom Lane
Josh Berkus writes: > 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. How so? If you think that the timestamp-without-zone is relative to GMT rather than your local zone,

Re: [BUGS] Inconsistent behavior with TIMESTAMP WITHOUT and epoch

2005-01-27 Thread Josh Berkus
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

Re: [BUGS] Inconsistent behavior with TIMESTAMP WITHOUT and epoch

2005-01-26 Thread Tom Lane
Josh Berkus writes: > Summary: "epoch" does not produce a consistent behavior when cast as > TIMESTAMP WITHOUT TIMEZONE 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://archive

[BUGS] Inconsistent behavior with TIMESTAMP WITHOUT and epoch

2005-01-24 Thread Josh Berkus
Summary: "epoch" does not produce a consistent behavior when cast as TIMESTAMP WITHOUT TIMEZONE Severity: Annoyance Tested On: 7.4.6, 8.0b4 Example: test=> select extract(epoch from '2004-12-01 00:00'::TIMESTAMP WITHOUT TIME ZONE); date_part 1101888000 this value is actually l