Using current time in UTC as default value in PostgreSQL
I have a column of the TIMESTAMP WITHOUT TIME ZONE type and would like to have that default to the current time in UTC. Getting the current time in UTC is easy: postgres=# select now() at time zone ‘utc’; timezone —————————- 2013-05-17 12:52:51.337466 (1 row) As is using the current timestamp for a column: postgres=# … Read more