|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.152 2005/09/0902:31:49 tgl Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.153 2005/09/0906:46:14 tgl Exp $ |
12 | 12 | *
|
13 | 13 | *-------------------------------------------------------------------------
|
14 | 14 | */
|
@@ -1897,18 +1897,14 @@ timestamp_mi(PG_FUNCTION_ARGS)
|
1897 | 1897 | result= (Interval*)palloc(sizeof(Interval));
|
1898 | 1898 |
|
1899 | 1899 | if (TIMESTAMP_NOT_FINITE(dt1)||TIMESTAMP_NOT_FINITE(dt2))
|
1900 |
| -{ |
1901 | 1900 | ereport(ERROR,
|
1902 | 1901 | (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
|
1903 | 1902 | errmsg("cannot subtract infinite timestamps")));
|
1904 | 1903 |
|
1905 |
| -result->time=0; |
1906 |
| -} |
1907 |
| -else |
1908 | 1904 | #ifdefHAVE_INT64_TIMESTAMP
|
1909 |
| -result->time=dt1-dt2; |
| 1905 | +result->time=dt1-dt2; |
1910 | 1906 | #else
|
1911 |
| -result->time=JROUND(dt1-dt2); |
| 1907 | +result->time=JROUND(dt1-dt2); |
1912 | 1908 | #endif
|
1913 | 1909 |
|
1914 | 1910 | result->month=0;
|
@@ -4196,7 +4192,7 @@ timestamptz_izone(PG_FUNCTION_ARGS)
|
4196 | 4192 | inttz;
|
4197 | 4193 |
|
4198 | 4194 | if (TIMESTAMP_NOT_FINITE(timestamp))
|
4199 |
| -PG_RETURN_NULL(); |
| 4195 | +PG_RETURN_TIMESTAMP(timestamp); |
4200 | 4196 |
|
4201 | 4197 | if (zone->month!=0)
|
4202 | 4198 | ereport(ERROR,
|
|