summaryrefslogtreecommitdiff
path: root/src/include/utils/typcache.h
diff options
context:
space:
mode:
authorTom Lane2010-10-25 03:04:37 +0000
committerTom Lane2010-10-25 03:05:41 +0000
commit84c123be1de8a9955741e20c9f945571e40c545e (patch)
tree6ea497e47ec62ef8e1ee83b9acfe1fcd2b2419d6 /src/include/utils/typcache.h
parent24b29ca8f9dc4a5e5f873f0fcb56438c526700f6 (diff)
Allow new values to be added to an existing enum type.
After much expenditure of effort, we've got this to the point where the performance penalty is pretty minimal in typical cases. Andrew Dunstan, reviewed by Brendan Jurd, Dean Rasheed, and Tom Lane
Diffstat (limited to 'src/include/utils/typcache.h')
-rw-r--r--src/include/utils/typcache.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/include/utils/typcache.h b/src/include/utils/typcache.h
index 4065e483e4b..28b66718b33 100644
--- a/src/include/utils/typcache.h
+++ b/src/include/utils/typcache.h
@@ -20,6 +20,9 @@
#include "fmgr.h"
+/* TypeCacheEnumData is an opaque struct known only within typcache.c */
+struct TypeCacheEnumData;
+
typedef struct TypeCacheEntry
{
/* typeId is the hash lookup key and MUST BE FIRST */
@@ -63,6 +66,12 @@ typedef struct TypeCacheEntry
* reference-counted tupledesc.)
*/
TupleDesc tupDesc;
+
+ /*
+ * Private information about an enum type. NULL if not enum or
+ * information hasn't been requested.
+ */
+ struct TypeCacheEnumData *enumData;
} TypeCacheEntry;
/* Bit flags to indicate which fields a given caller needs to have set */
@@ -86,4 +95,6 @@ extern TupleDesc lookup_rowtype_tupdesc_copy(Oid type_id, int32 typmod);
extern void assign_record_type_typmod(TupleDesc tupDesc);
+extern int compare_values_of_enum(TypeCacheEntry *tcache, Oid arg1, Oid arg2);
+
#endif /* TYPCACHE_H */