pgsql: Add transform functions for AT TIME ZONE.

From: Noah Misch <noah(at)leadboat(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add transform functions for AT TIME ZONE.
Date: 2015-03-01 18:42:17
Message-ID: E1YS8oj-0005UK-8x@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add transform functions for AT TIME ZONE.

This makes "ALTER TABLE tabname ALTER tscol TYPE ... USING tscol AT TIME
ZONE 'UTC'" skip rewriting the table when altering from "timestamp" to
"timestamptz" or vice versa. While it would be nicer still to optimize
this in the absence of the USING clause given timezone==UTC, transform
functions must consult IMMUTABLE facts only.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/b8a18ad4850ea5ad7884aa6ab731fd392e73b4ad

Modified Files
--------------
src/backend/utils/adt/timestamp.c | 128 +++++++++++++++++++++++++++++++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 12 ++--
src/include/utils/timestamp.h | 2 +
4 files changed, 139 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2015-03-01 19:07:11 pgsql: Use the typcache to cache constraints for domain types.
Previous Message Noah Misch 2015-03-01 18:21:12 pgsql: Unlink static libraries before rebuilding them.