File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 88 *
99 *
1010 * IDENTIFICATION
11- * $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.152 2005/09/09 02:31:49 tgl Exp $
11+ * $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.153 2005/09/09 06:46:14 tgl Exp $
1212 *
1313 *-------------------------------------------------------------------------
1414 */
@@ -1897,18 +1897,14 @@ timestamp_mi(PG_FUNCTION_ARGS)
18971897 result = (Interval * ) palloc (sizeof (Interval ));
18981898
18991899 if (TIMESTAMP_NOT_FINITE (dt1 ) || TIMESTAMP_NOT_FINITE (dt2 ))
1900- {
19011900 ereport (ERROR ,
19021901 (errcode (ERRCODE_DATETIME_VALUE_OUT_OF_RANGE ),
19031902 errmsg ("cannot subtract infinite timestamps" )));
19041903
1905- result -> time = 0 ;
1906- }
1907- else
19081904#ifdef HAVE_INT64_TIMESTAMP
1909- result -> time = dt1 - dt2 ;
1905+ result -> time = dt1 - dt2 ;
19101906#else
1911- result -> time = JROUND (dt1 - dt2 );
1907+ result -> time = JROUND (dt1 - dt2 );
19121908#endif
19131909
19141910 result -> month = 0 ;
@@ -4196,7 +4192,7 @@ timestamptz_izone(PG_FUNCTION_ARGS)
41964192 int tz ;
41974193
41984194 if (TIMESTAMP_NOT_FINITE (timestamp ))
4199- PG_RETURN_NULL ( );
4195+ PG_RETURN_TIMESTAMP ( timestamp );
42004196
42014197 if (zone -> month != 0 )
42024198 ereport (ERROR ,
You can’t perform that action at this time.
0 commit comments