aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-02-20 06:28:42 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-02-20 06:28:42 +0000
commitf4d108a25747754b5d265b12ef32c791ab547782 (patch)
tree6d0ff8e1e895d4115cb379cdfc2ea76327e661f6 /src
parent4467194b4479537c319a1842d27feaf027ac9fe2 (diff)
downloadpostgresql-f4d108a25747754b5d265b12ef32c791ab547782.tar.gz
postgresql-f4d108a25747754b5d265b12ef32c791ab547782.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/backend/parser/parse_coerce.c5
-rw-r--r--src/include/catalog/pg_type.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c
index 7fa7b016881..dbb6cbc5816 100644
--- a/src/backend/parser/parse_coerce.c
+++ b/src/backend/parser/parse_coerce.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.30 2000/02/16 17:24:37 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.31 2000/02/20 06:28:42 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -298,12 +298,15 @@ TypeCategory(Oid inType)
result = NUMERIC_TYPE;
break;
+ case (DATEOID):
+ case (TIMEOID):
case (ABSTIMEOID):
case (TIMESTAMPOID):
result = DATETIME_TYPE;
break;
case (RELTIMEOID):
+ case (TINTERVALOID):
case (INTERVALOID):
result = TIMESPAN_TYPE;
break;
diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h
index fa074460a7f..83dd6e6dce4 100644
--- a/src/include/catalog/pg_type.h
+++ b/src/include/catalog/pg_type.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_type.h,v 1.81 2000/02/16 17:26:07 thomas Exp $
+ * $Id: pg_type.h,v 1.82 2000/02/20 06:28:41 tgl Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -287,6 +287,7 @@ DESCR("relative, limited-range time interval (Unix delta time)");
#define RELTIMEOID 703
DATA(insert OID = 704 ( tinterval PGUID 12 47 f b t \054 0 0 tintervalin tintervalout tintervalin tintervalout i _null_ ));
DESCR("(abstime,abstime), time interval");
+#define TINTERVALOID 704
DATA(insert OID = 705 ( unknown PGUID -1 -1 f b t \054 0 18 textin textout textin textout i _null_ ));
DESCR("");
#define UNKNOWNOID 705