I happen to have tables with timestamp without time zone column in my database. Now I need to compare them with respect to time zone.
I can do it like:
select my_timestamp::timestamp with time zone at time zone 'EST5EDT'
from my_table
where
my_timestamp >= '2010-07-01'::timestamp at time zone 'EST5EDT'
and my_timestamp < '2010-08-01'::timestamp at time zone 'EST5EDT'
This is getting pretty ugly. Is there a shorter way that does not require me to type timestamp with time zone as type and at time zone as conversion?
timestamptzis an alias fortimestamp with time zone,timestampis an alias fortimestamp without time zone.I don’t think
at time zonehas an alias.