Have to_date() call timestamptz_date() per Karel's email instructions.
authorThomas G. Lockhart <[email protected]>
Fri, 4 Jan 2002 15:49:42 +0000 (15:49 +0000)
committerThomas G. Lockhart <[email protected]>
Fri, 4 Jan 2002 15:49:42 +0000 (15:49 +0000)
Fixes time zone problems introduced by Thomas' implementation of
 TIMESTAMP WITHOUT TIME ZONE which caused the behavior of the previously
 appropriate routine, timestamp_date(), to change for the worse in this
 context.

src/backend/utils/adt/formatting.c

index d268fde11ce8926385ec1fd038ab80446ec41ea2..6614d3335fb489fa80d1b36acc9ea3a87ea4c933 100644 (file)
@@ -3112,7 +3112,7 @@ to_date(PG_FUNCTION_ARGS)
         * Quick hack: since our inputs are just like to_timestamp, hand over
         * the whole input info struct...
         */
-       return DirectFunctionCall1(timestamp_date, to_timestamp(fcinfo));
+       return DirectFunctionCall1(timestamptz_date, to_timestamp(fcinfo));
 }
 
 /**********************************************************************