Martijn van Oosterhout wrote:
You misunderstand the TIMESTAMP WITH TIMEZONE type, it doesn't store
the timezone you gave it, it's just a point in time. Saying AT TIMEZONE
just converts it to a TIMESTAMP WITHOUT TIMEZONE with the local time it
was in the timezone you gave it. So you are complaring different
things. See:

You're right, I forgot that AT TIME ZONE on timestamptz value currently returns a timestamp, not timestamptz.


I do realize that currently timestamptz doesn't store the timezone offset/timezone name (thus timestamp and timestamptz both require the same amount of storage, 8 bytes). But I believe this probably won't be so in the future. So the question remains, does AT TIME ZONE already do what it's supposed to do (according to SQL standard, that is) or will the behaviour be changed in the future? Will AT TIME ZONE returns timestamptz in the future instead of timestamp, and will the "converted" timestamp value be the same if compared with '=' operator?

--
dave


---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings

Reply via email to