77 * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
88 * Portions Copyright (c) 1994, Regents of the University of California
99 *
10- * $Id: parse_coerce.h,v 1.33 2001/09/30 06:46:58 inoue Exp $
10+ * $Id: parse_coerce.h,v 1.34 2001/10/03 19:18:42 tgl Exp $
1111 *
1212 *-------------------------------------------------------------------------
1313 */
@@ -34,45 +34,6 @@ typedef enum CATEGORY
3434}CATEGORY ;
3535
3636
37- /* IS_BUILTIN_TYPE()
38- * Check for types which are in the core distribution.
39- * The built-in types can have more explicit support for type coersion, etc,
40- *since we know apriori how they should behave.
41- * - thomas 1998-05-13
42- */
43- #define IS_BUILTIN_TYPE (t ) \
44- (((t) == OIDOID) \
45- || ((t) == BOOLOID) \
46- || ((t) == BPCHAROID) \
47- || ((t) == VARCHAROID) \
48- || ((t) == TEXTOID) \
49- || ((t) == INT4OID) \
50- || ((t) == INT8OID) \
51- || ((t) == FLOAT8OID) \
52- || ((t) == NUMERICOID) \
53- || ((t) == TIMESTAMPOID) \
54- || ((t) == INTERVALOID) \
55- || ((t) == ABSTIMEOID) \
56- || ((t) == RELTIMEOID) \
57- || ((t) == DATEOID) \
58- || ((t) == TIMEOID) \
59- || ((t) == TIMETZOID) \
60- || ((t) == CHAROID) \
61- || ((t) == NAMEOID) \
62- || ((t) == CASHOID) \
63- || ((t) == POINTOID) \
64- || ((t) == LSEGOID) \
65- || ((t) == LINEOID) \
66- || ((t) == BOXOID) \
67- || ((t) == PATHOID) \
68- || ((t) == POLYGONOID) \
69- || ((t) == CIRCLEOID) \
70- || ((t) == INETOID) \
71- || ((t) == CIDROID) \
72- || ((t) == BITOID) \
73- || ((t) == VARBITOID) )
74-
75-
7637/* IS_BINARY_COMPATIBLE()
7738 * Check for types with the same underlying binary representation.
7839 * This allows us to cheat and directly exchange values without
@@ -104,28 +65,6 @@ typedef enum CATEGORY
10465|| ((a) == BITOID && (b) == VARBITOID) \
10566|| ((a) == VARBITOID && (b) == BITOID))
10667
107- /* IS_HIGHER_TYPE()
108- * These types are the most general in each of the type categories.
109- */
110- #define IS_HIGHER_TYPE (t ) \
111- (((t) == TEXTOID) \
112- || ((t) == FLOAT8OID) \
113- || ((t) == INTERVALOID) \
114- || ((t) == TIMESTAMPOID) \
115- || ((t) == POLYGONOID) \
116- || ((t) == INETOID) )
117-
118- /* IS_HIGHEST_TYPE()
119- * These types are the most general in each of the type categories.
120- * Since interval and timestamp overload so many functions, let's
121- *give timestamp the preference.
122- * Since text is a generic string type let's leave it out too.
123- */
124- #define IS_HIGHEST_TYPE (t ) \
125- (((t) == FLOAT8OID) \
126- || ((t) == TIMESTAMPOID) \
127- || ((t) == INTERVALOID))
128-
12968
13069extern bool IsPreferredType (CATEGORY category ,Oid type );
13170extern CATEGORY TypeCategory (Oid type );