skip to Main Content

Debian – Why pg_typeof(TIMESTAMP '2004-10-19 10:23:54+02') shows timestamp without time zone

From docs https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-DATETIME-INPUT-TIME-STAMPS TIMESTAMP '2004-10-19 10:23:54+02' is a timestamp with time zone Question: Why select pg_typeof(TIMESTAMP '2004-10-19 10:23:54+02'); gives timestamp without time zone? Expecting timestamp with time zone as docs say. Postgres version SELECT version(); shows PostgreSQL 14.14 (Debian 14.14-1.pgdg120+1)…

VIEW QUESTION

Postgresql – Why is string literal '2021-02-16 09:00' without timezone information interpreted as `timestamp with time zone` with AT TIME ZONE?

set timezone = 'Asia/Ho_Chi_Minh'; I set times displayed to GMT+7. select '2021-02-16 09:00' AT TIME ZONE 'Asia/Singapore'; select '2021-02-16 09:00+06' AT TIME ZONE 'Asia/Singapore'; Output 2021-02-16 10:00:00 2021-02-16 11:00:00 Because AT TIME ZONE converts timestamp without time zone to timestamp…

VIEW QUESTION
Back To Top
Search