New answers tagged timestamp
SELECT extract(epoch from now() at time zone 'utc'); doesn't return the correct timestamp because postgres timezone conversion throws away timezone information from the result: 9.9.3. AT TIME ZONE Syntax: timestamp without time zone AT TIME ZONE zone Returns: timestamp with time zone Treat given time stamp without time zone as located in the ...
change to insert into t select 1, to_timestamp ('2009-02-10 12:34:45.56','YYYY-MM-DD HH24:MI:SS.FF2') from dual; should work. Don't rely on default formats.
Your query is actually never technically correct, but it's across the top of the hour when you notice the error, and spanning midnight is likely to be even worse. What your query is actually asking the server to do is to subtract the values of two integers (possibly after an initial implicit cast, if you're storing them as strings), and then implicitly ...
Top 50 recent answers are included