Re: [BUGS] BUG #6424: Possible error in time to seconds conversion

2012-02-02 Thread Bousche, Olaf
: Wednesday, 01 February, 2012 17:00 To: Bousche, Olaf Cc: pgsql-bugs@postgresql.org Subject: Re: [BUGS] BUG #6424: Possible error in time to seconds conversion o.bous...@krohne.com writes: > Should the query > select > extract(epoch > from cast('2012-01-01 14:30:1' as &g

Re: [BUGS] BUG #6424: Possible error in time to seconds conversion

2012-02-01 Thread Tom Lane
Merlin Moncure writes: > TBH, I think the behavior of the example given is 100% correct *if a > timezone isn't specified', which the OP didn't. It's only weird if > you do this: ... > which really boils down to this: > postgres=# select extract(epoch from '1970-01-01 0:0:0 GMT'::timestamp); > d

Re: [BUGS] BUG #6424: Possible error in time to seconds conversion

2012-02-01 Thread Merlin Moncure
On Wed, Feb 1, 2012 at 10:00 AM, Tom Lane wrote: > o.bous...@krohne.com writes: >> Should the query > >> select >>   extract(epoch >>     from cast('2012-01-01 14:30:1' as >>              timestamp) - >>          cast('1970-01-01 0:0:0' as >>               timestamp))) - >>   extract(epoch >>    

Re: [BUGS] BUG #6424: Possible error in time to seconds conversion

2012-02-01 Thread Tom Lane
o.bous...@krohne.com writes: > Should the query > select > extract(epoch > from cast('2012-01-01 14:30:1' as > timestamp) - > cast('1970-01-01 0:0:0' as > timestamp))) - > extract(epoch > from (cast('2012-01-01 14:30:1' as > timestamp)

[BUGS] BUG #6424: Possible error in time to seconds conversion

2012-02-01 Thread o . bousche
The following bug has been logged on the website: Bug reference: 6424 Logged by: Olaf Email address: o.bous...@krohne.com PostgreSQL version: 9.1.2 Operating system: Windows 7 - 64bits Description: Should the query select extract(epoch from cast('2012-01-01 14: