Skip to content

Commit f4d108a

Browse files
committed
Even after the great date/time consolidation, TypeCategory() was still
a few bricks shy of a load concerning knowing all the date/time types. This is real bad because it interferes with func_select_candidate()'s willingness to disambiguate functions --- func_select_candidate() will punt unless all the available choices have the same type category. I think this whole mechanism needs redesigned, but in the meantime this is a needed patch.
1 parent 4467194 commit f4d108a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/backend/parser/parse_coerce.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.30 2000/02/16 17:24:37 thomas Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.31 2000/02/20 06:28:42 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -298,12 +298,15 @@ TypeCategory(Oid inType)
298298
result = NUMERIC_TYPE;
299299
break;
300300

301+
case (DATEOID):
302+
case (TIMEOID):
301303
case (ABSTIMEOID):
302304
case (TIMESTAMPOID):
303305
result = DATETIME_TYPE;
304306
break;
305307

306308
case (RELTIMEOID):
309+
case (TINTERVALOID):
307310
case (INTERVALOID):
308311
result = TIMESPAN_TYPE;
309312
break;

src/include/catalog/pg_type.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $Id: pg_type.h,v 1.81 2000/02/16 17:26:07 thomas Exp $
11+
* $Id: pg_type.h,v 1.82 2000/02/20 06:28:41 tgl Exp $
1212
*
1313
* NOTES
1414
* the genbki.sh script reads this file and generates .bki
@@ -287,6 +287,7 @@ DESCR("relative, limited-range time interval (Unix delta time)");
287287
#define RELTIMEOID 703
288288
DATA(insert OID = 704 ( tinterval PGUID 12 47 f b t \054 0 0 tintervalin tintervalout tintervalin tintervalout i _null_ ));
289289
DESCR("(abstime,abstime), time interval");
290+
#define TINTERVALOID 704
290291
DATA(insert OID = 705 ( unknown PGUID -1 -1 f b t \054 0 18 textin textout textin textout i _null_ ));
291292
DESCR("");
292293
#define UNKNOWNOID 705

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy