*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.159 2005/11/22 18:17:23 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.160 2005/11/22 22:30:33 tgl Exp $
*
*-------------------------------------------------------------------------
*/
result->month = 0;
result->day = 0;
- /*
- * This is wrong, but removing it breaks a lot of regression tests. For
- * example:
+ /*----------
+ * This is wrong, but removing it breaks a lot of regression tests.
+ * For example:
*
- * test=> SET timezone = 'EST5EDT'; test=> SELECT test-> ('2005-10-30
- * 13:22:00-05'::timestamptz - test(> '2005-10-29
- * 13:22:00-04'::timestamptz); ?column? ---------------- 1 day 01:00:00 (1
- * row)
+ * test=> SET timezone = 'EST5EDT';
+ * test=> SELECT
+ * test-> ('2005-10-30 13:22:00-05'::timestamptz -
+ * test(> '2005-10-29 13:22:00-04'::timestamptz);
+ * ?column?
+ * ----------------
+ * 1 day 01:00:00
+ * (1 row)
*
- * so adding that to the first timestamp gets:
+ * so adding that to the first timestamp gets:
*
- * test=> SELECT test-> ('2005-10-29 13:22:00-04'::timestamptz + test(>
- * ('2005-10-30 13:22:00-05'::timestamptz - test(> '2005-10-29
- * 13:22:00-04'::timestamptz)) at time zone 'EST'; timezone
- * -------------------- 2005-10-30 14:22:00 (1 row)
+ * test=> SELECT
+ * test-> ('2005-10-29 13:22:00-04'::timestamptz +
+ * test(> ('2005-10-30 13:22:00-05'::timestamptz -
+ * test(> '2005-10-29 13:22:00-04'::timestamptz)) at time zone 'EST';
+ * timezone
+ * --------------------
+ * 2005-10-30 14:22:00
+ * (1 row)
+ *----------
*/
result = DatumGetIntervalP(DirectFunctionCall1(interval_justify_hours,
IntervalPGetDatum(result)));