Skip to content

Commit 192061e

Browse files
author
Thomas G. Lockhart
committed
Repair bugs in declarations of routines to add timestamptz and interval.
Thanks to Bruce for spotting it and Tom Lane for diagnosing it. Since horology test output is changing anyway, add some date/time input tests to horology.sql. Some of these should move to the tests for the individual data types, and we perhaps should add an entire new test for "timezone" to allow manipulating the current time zone without risking damage to the results of other tests.
1 parent 0e1a507 commit 192061e

File tree

4 files changed

+381
-93
lines changed

4 files changed

+381
-93
lines changed

src/backend/utils/adt/timestamp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.61 2001/12/29 18:31:31 thomas Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.62 2002/01/12 04:38:27 thomas Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1290,7 +1290,7 @@ timestamp_mi_span(PG_FUNCTION_ARGS)
12901290
}
12911291

12921292

1293-
/* timestamp_pl_span()
1293+
/* timestamptz_pl_span()
12941294
* Add a interval to a timestamp with time zone data type.
12951295
* Note that interval has provisions for qualitative year/month
12961296
* units, so try to do the right thing with them.
@@ -1371,7 +1371,7 @@ timestamptz_mi_span(PG_FUNCTION_ARGS)
13711371
tspan.month = -span->month;
13721372
tspan.time = -span->time;
13731373

1374-
return DirectFunctionCall2(timestamp_pl_span,
1374+
return DirectFunctionCall2(timestamptz_pl_span,
13751375
TimestampGetDatum(timestamp),
13761376
PointerGetDatum(&tspan));
13771377
}

src/include/catalog/pg_proc.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: pg_proc.h,v 1.221 2001/11/05 17:46:32 momjian Exp $
10+
* $Id: pg_proc.h,v 1.222 2002/01/12 04:38:31 thomas Exp $
1111
*
1212
* NOTES
1313
* The script catalog/genbki.sh reads this file and generates .bki
@@ -1458,9 +1458,9 @@ DESCR("age of a transaction ID, in transactions before current transaction");
14581458

14591459
DATA(insert OID = 1188 ( timestamptz_mi PGUID 12 f t t t 2 f 1186 "1184 1184" 100 0 0 100 timestamp_mi - ));
14601460
DESCR("subtract");
1461-
DATA(insert OID = 1189 ( timestamptz_pl_span PGUID 12 f t t t 2 f 1184 "1184 1186" 100 0 0 100 timestamp_pl_span - ));
1461+
DATA(insert OID = 1189 ( timestamptz_pl_span PGUID 12 f t t t 2 f 1184 "1184 1186" 100 0 0 100 timestamptz_pl_span - ));
14621462
DESCR("plus");
1463-
DATA(insert OID = 1190 ( timestamptz_mi_span PGUID 12 f t t t 2 f 1184 "1184 1186" 100 0 0 100 timestamp_mi_span - ));
1463+
DATA(insert OID = 1190 ( timestamptz_mi_span PGUID 12 f t t t 2 f 1184 "1184 1186" 100 0 0 100 timestamptz_mi_span - ));
14641464
DESCR("minus");
14651465
DATA(insert OID = 1191 ( timestamptz PGUID 12 f t f t 1 f 1184 "25" 100 0 0 100 text_timestamptz - ));
14661466
DESCR("convert text to timestamp with time zone");

0 commit comments

Comments
 (0)