|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.159 2005/11/2218:17:23 momjian Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.160 2005/11/2222:30:33 tgl Exp $ |
12 | 12 | * |
13 | 13 | *------------------------------------------------------------------------- |
14 | 14 | */ |
@@ -1943,21 +1943,30 @@ timestamp_mi(PG_FUNCTION_ARGS) |
1943 | 1943 | result->month=0; |
1944 | 1944 | result->day=0; |
1945 | 1945 |
|
1946 | | -/* |
1947 | | - *This is wrong, but removing it breaks a lot of regression tests. For |
1948 | | - * example: |
| 1946 | +/*---------- |
| 1947 | + *This is wrong, but removing it breaks a lot of regression tests. |
| 1948 | + *For example: |
1949 | 1949 | * |
1950 | | - * test=> SET timezone = 'EST5EDT'; test=> SELECT test-> ('2005-10-30 |
1951 | | - * 13:22:00-05'::timestamptz - test(> '2005-10-29 |
1952 | | - * 13:22:00-04'::timestamptz); ?column? ---------------- 1 day 01:00:00 (1 |
1953 | | - * row) |
| 1950 | + *test=> SET timezone = 'EST5EDT'; |
| 1951 | + *test=> SELECT |
| 1952 | + *test-> ('2005-10-30 13:22:00-05'::timestamptz - |
| 1953 | + *test(> '2005-10-29 13:22:00-04'::timestamptz); |
| 1954 | + *?column? |
| 1955 | + *---------------- |
| 1956 | + * 1 day 01:00:00 |
| 1957 | + * (1 row) |
1954 | 1958 | * |
1955 | | - *so adding that to the first timestamp gets: |
| 1959 | + *so adding that to the first timestamp gets: |
1956 | 1960 | * |
1957 | | - * test=> SELECT test-> ('2005-10-29 13:22:00-04'::timestamptz + test(> |
1958 | | - * ('2005-10-30 13:22:00-05'::timestamptz - test(>'2005-10-29 |
1959 | | - * 13:22:00-04'::timestamptz)) at time zone 'EST'; timezone |
1960 | | - * -------------------- 2005-10-30 14:22:00 (1 row) |
| 1961 | + * test=> SELECT |
| 1962 | + * test-> ('2005-10-29 13:22:00-04'::timestamptz + |
| 1963 | + * test(> ('2005-10-30 13:22:00-05'::timestamptz - |
| 1964 | + * test(> '2005-10-29 13:22:00-04'::timestamptz)) at time zone 'EST'; |
| 1965 | + * timezone |
| 1966 | + *-------------------- |
| 1967 | + *2005-10-30 14:22:00 |
| 1968 | + *(1 row) |
| 1969 | + *---------- |
1961 | 1970 | */ |
1962 | 1971 | result=DatumGetIntervalP(DirectFunctionCall1(interval_justify_hours, |
1963 | 1972 | IntervalPGetDatum(result))); |
|