From 3671cb3a3210c5e7e8aea61aa8526966cb34b58f Mon Sep 17 00:00:00 2001 From: "Thomas G. Lockhart" Date: Fri, 29 May 1998 14:02:28 +0000 Subject: [PATCH] Add NAMEOID as built-in type. Change ordering of IS_BUILTIN_TYPE() macro to optimize lookup. Make CASH type _not_ equivalent to INT4. CASH is passed by reference rather than passed by value. --- src/include/parser/parse_coerce.h | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/include/parser/parse_coerce.h b/src/include/parser/parse_coerce.h index 0d7aa705d0..39727e7964 100644 --- a/src/include/parser/parse_coerce.h +++ b/src/include/parser/parse_coerce.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parse_coerce.h,v 1.1 1998/05/09 23:31:34 thomas Exp $ + * $Id: parse_coerce.h,v 1.2 1998/05/29 14:02:28 thomas Exp $ * *------------------------------------------------------------------------- */ @@ -27,18 +27,33 @@ typedef enum CATEGORY { } CATEGORY; +/* IS_BUILTIN_TYPE() + * Check for types which are in the core distribution. + * The built-in types can have more explicit support for type coersion, etc, + * since we know apriori how they should behave. + * - thomas 1998-05-13 + */ #define IS_BUILTIN_TYPE(t) \ (((t) == BOOLOID) \ || ((t) == BPCHAROID) \ || ((t) == VARCHAROID) \ || ((t) == TEXTOID) \ - || ((t) == CASHOID) \ || ((t) == INT4OID) \ || ((t) == DATETIMEOID) \ || ((t) == FLOAT8OID) \ - || ((t) == ABSTIMEOID) \ || ((t) == TIMESTAMPOID) \ - || ((t) == RELTIMEOID)) + || ((t) == ABSTIMEOID) \ + || ((t) == RELTIMEOID) \ + || ((t) == CHAROID) \ + || ((t) == NAMEOID) \ + || ((t) == CASHOID) \ + || ((t) == POINTOID) \ + || ((t) == LSEGOID) \ + || ((t) == LINEOID) \ + || ((t) == BOXOID) \ + || ((t) == PATHOID) \ + || ((t) == POLYGONOID) \ + || ((t) == CIRCLEOID)) /* IS_BINARY_COMPATIBLE() @@ -53,14 +68,14 @@ typedef enum CATEGORY { || ((a) == VARCHAROID && (b) == BPCHAROID) \ || ((a) == TEXTOID && (b) == BPCHAROID) \ || ((a) == TEXTOID && (b) == VARCHAROID) \ - || ((a) == CASHOID && (b) == INT4OID) \ - || ((a) == INT4OID && (b) == CASHOID) \ || ((a) == DATETIMEOID && (b) == FLOAT8OID) \ || ((a) == FLOAT8OID && (b) == DATETIMEOID) \ || ((a) == ABSTIMEOID && (b) == TIMESTAMPOID) \ - || ((a) == TIMESTAMPOID && (b) == ABSTIMEOID) \ || ((a) == ABSTIMEOID && (b) == INT4OID) \ + || ((a) == TIMESTAMPOID && (b) == ABSTIMEOID) \ + || ((a) == TIMESTAMPOID && (b) == INT4OID) \ || ((a) == INT4OID && (b) == ABSTIMEOID) \ + || ((a) == INT4OID && (b) == TIMESTAMPOID) \ || ((a) == RELTIMEOID && (b) == INT4OID) \ || ((a) == INT4OID && (b) == RELTIMEOID)) -- 2.40.0