24 #include "utils/fmgroids.h"
47 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
48 errmsg(
"invalid input value for enum %s: \"%s\"",
57 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
58 errmsg(
"invalid input value for enum %s: \"%s\"",
84 (
errcode(ERRCODE_INVALID_BINARY_REPRESENTATION),
85 errmsg(
"invalid internal value for enum: %u",
112 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
113 errmsg(
"invalid input value for enum %s: \"%s\"",
122 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
123 errmsg(
"invalid input value for enum %s: \"%s\"",
147 (
errcode(ERRCODE_INVALID_BINARY_REPRESENTATION),
148 errmsg(
"invalid internal value for enum: %u",
177 if ((arg1 & 1) == 0 && (arg2 & 1) == 0)
197 (
errcode(ERRCODE_INVALID_BINARY_REPRESENTATION),
198 errmsg(
"invalid internal value for enum: %u",
201 typeoid = en->enumtypid;
355 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
356 errmsg(
"could not determine actual enum type")));
363 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
364 errmsg(
"enum %s contains no values",
384 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
385 errmsg(
"could not determine actual enum type")));
392 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
393 errmsg(
"enum %s contains no values",
424 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
425 errmsg(
"could not determine actual enum type")));
444 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
445 errmsg(
"could not determine actual enum type")));
488 if (!left_found && lower == enum_oid)
int compare_values_of_enum(TypeCacheEntry *tcache, Oid arg1, Oid arg2)
Datum enum_recv(PG_FUNCTION_ARGS)
Datum enum_in(PG_FUNCTION_ARGS)
Datum enum_last(PG_FUNCTION_ARGS)
Datum lower(PG_FUNCTION_ARGS)
char * pstrdup(const char *in)
StringInfoData * StringInfo
#define PG_RETURN_INT32(x)
ArrayType * construct_array(Datum *elems, int nelems, Oid elmtype, int elmlen, bool elmbyval, char elmalign)
int errcode(int sqlerrcode)
#define PG_GETARG_POINTER(n)
#define PG_RETURN_BYTEA_P(x)
Datum upper(PG_FUNCTION_ARGS)
HeapTuple systable_getnext_ordered(SysScanDesc sysscan, ScanDirection direction)
#define OidIsValid(objectId)
Datum enum_eq(PG_FUNCTION_ARGS)
#define SearchSysCache1(cacheId, key1)
Datum enum_lt(PG_FUNCTION_ARGS)
Datum enum_range_all(PG_FUNCTION_ARGS)
Datum enum_out(PG_FUNCTION_ARGS)
void pfree(void *pointer)
Datum enum_gt(PG_FUNCTION_ARGS)
static ArrayType * enum_range_internal(Oid enumtypoid, Oid lower, Oid upper)
Datum enum_ne(PG_FUNCTION_ARGS)
Datum enum_first(PG_FUNCTION_ARGS)
#define ObjectIdGetDatum(X)
Oid get_fn_expr_argtype(FmgrInfo *flinfo, int argnum)
Datum enum_le(PG_FUNCTION_ARGS)
static Oid enum_endpoint(Oid enumtypoid, ScanDirection direction)
#define CStringGetDatum(X)
FormData_pg_enum * Form_pg_enum
Datum enum_ge(PG_FUNCTION_ARGS)
#define PG_RETURN_ARRAYTYPE_P(x)
#define ereport(elevel, rest)
Datum enum_larger(PG_FUNCTION_ARGS)
Datum enum_smaller(PG_FUNCTION_ARGS)
#define PG_RETURN_BOOL(x)
void ReleaseSysCache(HeapTuple tuple)
Datum enum_range_bounds(PG_FUNCTION_ARGS)
Relation heap_open(Oid relationId, LOCKMODE lockmode)
void systable_endscan_ordered(SysScanDesc sysscan)
TypeCacheEntry * lookup_type_cache(Oid type_id, int flags)
Datum enum_send(PG_FUNCTION_ARGS)
#define HeapTupleIsValid(tuple)
Datum enum_cmp(PG_FUNCTION_ARGS)
#define PG_RETURN_CSTRING(x)
void * repalloc(void *pointer, Size size)
void index_close(Relation relation, LOCKMODE lockmode)
#define Anum_pg_enum_enumtypid
int errmsg(const char *fmt,...)
SysScanDesc systable_beginscan_ordered(Relation heapRelation, Relation indexRelation, Snapshot snapshot, int nkeys, ScanKey key)
#define EnumTypIdSortOrderIndexId
static int enum_cmp_internal(Oid arg1, Oid arg2, FunctionCallInfo fcinfo)
void ScanKeyInit(ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument)
#define PG_GETARG_CSTRING(n)
#define HeapTupleGetOid(tuple)
Relation index_open(Oid relationId, LOCKMODE lockmode)
#define BTEqualStrategyNumber
#define SearchSysCache2(cacheId, key1, key2)