mirror of
https://github.com/postgres/postgres.git
synced 2025-07-14 08:21:07 +03:00
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
This commit is contained in:
@ -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 */
|
||||
|
Reference in New Issue
Block a user