aboutsummaryrefslogtreecommitdiff
path: root/src/include/parser/parse_coerce.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/parser/parse_coerce.h')
-rw-r--r--src/include/parser/parse_coerce.h24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/include/parser/parse_coerce.h b/src/include/parser/parse_coerce.h
index ab36a0c1969..68d5173378a 100644
--- a/src/include/parser/parse_coerce.h
+++ b/src/include/parser/parse_coerce.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/parser/parse_coerce.h,v 1.75 2008/01/11 18:39:41 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/parser/parse_coerce.h,v 1.76 2008/07/30 17:05:05 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,22 +17,8 @@
#include "parser/parse_node.h"
-/* Type categories (kluge ... ought to be extensible) */
-typedef enum CATEGORY
-{
- INVALID_TYPE,
- UNKNOWN_TYPE,
- GENERIC_TYPE,
- BOOLEAN_TYPE,
- STRING_TYPE,
- BITSTRING_TYPE,
- NUMERIC_TYPE,
- DATETIME_TYPE,
- TIMESPAN_TYPE,
- GEOMETRIC_TYPE,
- NETWORK_TYPE,
- USER_TYPE
-} CATEGORY;
+/* Type categories (see TYPCATEGORY_xxx symbols in catalog/pg_type.h) */
+typedef char TYPCATEGORY;
/* Result codes for find_coercion_pathway */
typedef enum CoercionPathType
@@ -46,8 +32,8 @@ typedef enum CoercionPathType
extern bool IsBinaryCoercible(Oid srctype, Oid targettype);
-extern bool IsPreferredType(CATEGORY category, Oid type);
-extern CATEGORY TypeCategory(Oid type);
+extern bool IsPreferredType(TYPCATEGORY category, Oid type);
+extern TYPCATEGORY TypeCategory(Oid type);
extern Node *coerce_to_target_type(ParseState *pstate,
Node *expr, Oid exprtype,