From: Russ Tyndall Date: Wed, 7 Feb 2018 14:17:36 +0000 (-0500) Subject: Store walltimes as timestamptz by default in postgres X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=529452ae19c763cb1ed262e13bb589a8b6614e35 Store walltimes as timestamptz by default in postgres * This removes significant ambiguity from working with datetimes and by all accounts *should* be default now that we can correctly track it re ADWolf:#1408 --- diff --git a/ChangeLog b/ChangeLog index 29ac560..8b393e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2018-02-04 Russ Tyndall + * sql/generic-postgres.lisp: + Wall times default to being timestamptz in postgresql now. + There was a TODO questioning why it was storing zoneless by + default - it was because of the bugs about tracking UTC + vs zoneless + + 2018-02-03 Russ Tyndall * sql/time.lisp, tests/time.lisp: Better distinguishing between zoneless timestamps and UTC times, diff --git a/sql/generic-postgresql.lisp b/sql/generic-postgresql.lisp index 13d4f77..2464746 100644 --- a/sql/generic-postgresql.lisp +++ b/sql/generic-postgresql.lisp @@ -25,8 +25,10 @@ "Special database types for POSTGRESQL backends" (declare (ignore database db-type)) (case type - (wall-time ;; TODO: why is this WITHOUT... - "TIMESTAMP WITHOUT TIME ZONE") + ;; his used to be without because we didnt track timezones well + ;; Now we do, so it should include them + (wall-time + "TIMESTAMP WITH TIME ZONE") (string ;; TODO: the default to CHAR here seems specious as the PG docs claim ;; that char is slower than varchar