24#include "utils/fmgroids.h"
99 errmsg(
"unsafe use of new value \"%s\" of enum type %s",
102 errhint(
"New enum values must be committed before they can be used.")));
113 Node *escontext = fcinfo->context;
121 errmsg(
"invalid input value for enum %s: \"%s\"",
131 errmsg(
"invalid input value for enum %s: \"%s\"",
166 errmsg(
"invalid internal value for enum: %u",
194 errmsg(
"invalid input value for enum %s: \"%s\"",
204 errmsg(
"invalid input value for enum %s: \"%s\"",
232 errmsg(
"invalid internal value for enum: %u",
270 if ((
arg1 & 1) == 0 && (
arg2 & 1) == 0)
291 errmsg(
"invalid internal value for enum: %u",
451 errmsg(
"could not determine actual enum type")));
459 errmsg(
"enum %s contains no values",
480 errmsg(
"could not determine actual enum type")));
488 errmsg(
"enum %s contains no values",
520 errmsg(
"could not determine actual enum type")));
540 errmsg(
"could not determine actual enum type")));
#define PG_RETURN_ARRAYTYPE_P(x)
ArrayType * construct_array(Datum *elems, int nelems, Oid elmtype, int elmlen, bool elmbyval, char elmalign)
#define Assert(condition)
#define OidIsValid(objectId)
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereturn(context, dummy_value,...)
#define ereport(elevel,...)
Datum enum_range_all(PG_FUNCTION_ARGS)
Datum enum_last(PG_FUNCTION_ARGS)
static void check_safe_enum_use(HeapTuple enumval_tup)
Datum enum_gt(PG_FUNCTION_ARGS)
Datum enum_first(PG_FUNCTION_ARGS)
static Oid enum_endpoint(Oid enumtypoid, ScanDirection direction)
Datum enum_smaller(PG_FUNCTION_ARGS)
Datum enum_lt(PG_FUNCTION_ARGS)
Datum enum_cmp(PG_FUNCTION_ARGS)
Datum enum_eq(PG_FUNCTION_ARGS)
Datum enum_range_bounds(PG_FUNCTION_ARGS)
Datum enum_send(PG_FUNCTION_ARGS)
static ArrayType * enum_range_internal(Oid enumtypoid, Oid lower, Oid upper)
Datum enum_ge(PG_FUNCTION_ARGS)
Datum enum_in(PG_FUNCTION_ARGS)
Datum enum_recv(PG_FUNCTION_ARGS)
static int enum_cmp_internal(Oid arg1, Oid arg2, FunctionCallInfo fcinfo)
Datum enum_out(PG_FUNCTION_ARGS)
Datum enum_larger(PG_FUNCTION_ARGS)
Datum enum_le(PG_FUNCTION_ARGS)
Datum enum_ne(PG_FUNCTION_ARGS)
Oid get_fn_expr_argtype(FmgrInfo *flinfo, int argnum)
#define PG_RETURN_BYTEA_P(x)
#define PG_GETARG_POINTER(n)
#define PG_RETURN_CSTRING(x)
#define PG_GETARG_CSTRING(n)
#define PG_RETURN_INT32(x)
#define PG_RETURN_BOOL(x)
SysScanDesc systable_beginscan_ordered(Relation heapRelation, Relation indexRelation, Snapshot snapshot, int nkeys, ScanKey key)
void systable_endscan_ordered(SysScanDesc sysscan)
HeapTuple systable_getnext_ordered(SysScanDesc sysscan, ScanDirection direction)
#define HeapTupleIsValid(tuple)
static TransactionId HeapTupleHeaderGetXmin(const HeapTupleHeaderData *tup)
static void * GETSTRUCT(const HeapTupleData *tuple)
static bool HeapTupleHeaderXminCommitted(const HeapTupleHeaderData *tup)
void index_close(Relation relation, LOCKMODE lockmode)
Relation index_open(Oid relationId, LOCKMODE lockmode)
char * pstrdup(const char *in)
void * repalloc(void *pointer, Size size)
void pfree(void *pointer)
Datum lower(PG_FUNCTION_ARGS)
Datum upper(PG_FUNCTION_ARGS)
bool EnumUncommitted(Oid enum_id)
FormData_pg_enum * Form_pg_enum
static char buf[DEFAULT_XLOG_SEG_SIZE]
static Datum ObjectIdGetDatum(Oid X)
static Datum CStringGetDatum(const char *X)
bool TransactionIdIsInProgress(TransactionId xid)
void ScanKeyInit(ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument)
#define BTEqualStrategyNumber
struct StringInfoData * StringInfo
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
HeapTuple SearchSysCache2(int cacheId, Datum key1, Datum key2)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)
bool TransactionIdDidCommit(TransactionId transactionId)
int compare_values_of_enum(TypeCacheEntry *tcache, Oid arg1, Oid arg2)
TypeCacheEntry * lookup_type_cache(Oid type_id, int flags)