Re: Inconsistent behavior with TIMESTAMP WITHOUT and epoch
От | Josh Berkus |
---|---|
Тема | Re: Inconsistent behavior with TIMESTAMP WITHOUT and epoch |
Дата | |
Msg-id | 200501271117.41205.josh@agliodbs.com обсуждение исходный текст |
Ответ на | Re: Inconsistent behavior with TIMESTAMP WITHOUT and epoch (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-bugs |
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 should be using timestamp WITH time zone for such an > application anyway. The timestamp without zone datatype is very > strongly biased towards the assumption that the value is in your local > timezone, and if you've actually got multiple possible settings of > TimeZone then it's simply a great way to shoot yourself in the foot. Well, I was thinking about this on the way to my office this AM, and realized that there's a fundamental gulf between timestamp-as-real-moment-in-time (the SQL timestamp and postgres timestamp) and timestamp-as-mark-on-the-calendar (what I'm dealing with), and that my trouble stems from trying to coerce the first into the second. Maybe it's time to hack a datatype ... -- --Josh Josh Berkus Aglio Database Solutions San Francisco
В списке pgsql-bugs по дате отправления: