From b8a18ad4850ea5ad7884aa6ab731fd392e73b4ad Mon Sep 17 00:00:00 2001 From: Noah Misch Date: Sun, 1 Mar 2015 13:22:34 -0500 Subject: 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. --- src/include/utils/timestamp.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/include/utils/timestamp.h') diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h index 70118f599c6..530fef1915e 100644 --- a/src/include/utils/timestamp.h +++ b/src/include/utils/timestamp.h @@ -161,7 +161,9 @@ extern Datum timestamp_trunc(PG_FUNCTION_ARGS); extern Datum interval_trunc(PG_FUNCTION_ARGS); extern Datum timestamp_part(PG_FUNCTION_ARGS); extern Datum interval_part(PG_FUNCTION_ARGS); +extern Datum timestamp_zone_transform(PG_FUNCTION_ARGS); extern Datum timestamp_zone(PG_FUNCTION_ARGS); +extern Datum timestamp_izone_transform(PG_FUNCTION_ARGS); extern Datum timestamp_izone(PG_FUNCTION_ARGS); extern Datum timestamp_timestamptz(PG_FUNCTION_ARGS); -- cgit v1.2.3