69#include "utils/fmgroids.h"
223 errmsg(
"must be superuser to create a base type")));
255 errmsg(
"type \"%s\" already exists", typeName)));
262 if (parameters ==
NIL)
267 errmsg(
"type \"%s\" already exists", typeName)));
280 errmsg(
"type \"%s\" does not exist", typeName),
281 errhint(
"Create the type as a shell type, then create its I/O functions, then do a full CREATE TYPE.")));
284 foreach(
pl, parameters)
291 else if (
strcmp(
defel->defname,
"internallength") == 0)
303 else if (
strcmp(
defel->defname,
"typmod_out") == 0)
320 else if (
strcmp(
defel->defname,
"passedbyvalue") == 0)
326 else if (
strcmp(
defel->defname,
"collatable") == 0)
333 errmsg(
"type attribute \"%s\" not recognized",
388 errmsg(
"invalid type category \"%s\": must be simple ASCII",
407 errmsg(
"array element type cannot be %s",
439 errmsg(
"alignment \"%s\" not recognized",
a)));
456 errmsg(
"storage \"%s\" not recognized",
a)));
467 errmsg(
"type input function must be specified")));
471 errmsg(
"type output function must be specified")));
476 errmsg(
"type modifier output function is useless without a type modifier input function")));
518 errmsg(
"element type cannot be specified without a subscripting function")));
668 elog(
ERROR,
"cache lookup failed for type %u", typeOid);
778 typtype = baseType->typtype;
787 errmsg(
"\"%s\" is not a valid base type for a domain",
805 if (
stmt->collClause)
814 errmsg(
"collations are not supported by type %s",
825 storage = baseType->typstorage;
831 category = baseType->typcategory;
874 elog(
ERROR,
"unrecognized node type: %d",
887 errmsg(
"multiple default expressions"),
949 errmsg(
"conflicting NULL/NOT NULL constraints"),
954 errmsg(
"redundant NOT NULL constraint definition"),
960 errmsg(
"not-null constraints for domains cannot be marked NO INHERIT"),
970 errmsg(
"conflicting NULL/NOT NULL constraints"),
987 errmsg(
"check constraints for domains cannot be marked NO INHERIT"),
998 errmsg(
"unique constraints not possible for domains"),
1005 errmsg(
"primary key constraints not possible for domains"),
1012 errmsg(
"exclusion constraints not possible for domains"),
1019 errmsg(
"foreign key constraints not possible for domains"),
1029 errmsg(
"specifying constraint deferrability not supported for domains"),
1037 errmsg(
"specifying GENERATED not supported for domains"),
1045 errmsg(
"specifying constraint enforceability not supported for domains"),
1336 stmt->newValNeighbor,
stmt->newValIsAfter,
1337 stmt->skipIfNewValExists);
1363 errmsg(
"%s is not an enum",
1446 errmsg(
"type \"%s\" already exists", typeName)));
1455 foreach(
lc,
stmt->params)
1466 else if (
strcmp(
defel->defname,
"subtype_opclass") == 0)
1472 else if (
strcmp(
defel->defname,
"collation") == 0)
1478 else if (
strcmp(
defel->defname,
"canonical") == 0)
1484 else if (
strcmp(
defel->defname,
"subtype_diff") == 0)
1490 else if (
strcmp(
defel->defname,
"multirange_type_name") == 0)
1501 errmsg(
"type attribute \"%s\" not recognized",
1509 errmsg(
"type attribute \"subtype\" is required")));
1514 errmsg(
"range subtype cannot be %s",
1533 errmsg(
"range collation specified but subtype does not support collation")));
1543 errmsg(
"cannot specify a canonical function without a pre-created shell type"),
1544 errhint(
"Create the type as a shell type, then create its canonicalization function, then do a full CREATE TYPE.")));
1792 static const char *
const prosrc[2] = {
"range_constructor2",
1793 "range_constructor3"};
1794 static const int pronargs[2] = {2, 3};
1895 "multirange_constructor0",
1941 "multirange_constructor1",
1980 "multirange_constructor2",
2038 errmsg(
"type input function %s has multiple matches",
2048 errmsg(
"function %s does not exist",
2056 errmsg(
"type input function %s must return type %s",
2072 errmsg(
"type input function %s should not be volatile",
2094 errmsg(
"function %s does not exist",
2100 errmsg(
"type output function %s must return type %s",
2107 errmsg(
"type output function %s should not be volatile",
2136 errmsg(
"type receive function %s has multiple matches",
2146 errmsg(
"function %s does not exist",
2154 errmsg(
"type receive function %s must return type %s",
2161 errmsg(
"type receive function %s should not be volatile",
2183 errmsg(
"function %s does not exist",
2189 errmsg(
"type send function %s must return type %s",
2196 errmsg(
"type send function %s should not be volatile",
2217 errmsg(
"function %s does not exist",
2223 errmsg(
"typmod_in function %s must return type %s",
2230 errmsg(
"type modifier input function %s should not be volatile",
2251 errmsg(
"function %s does not exist",
2257 errmsg(
"typmod_out function %s must return type %s",
2264 errmsg(
"type modifier output function %s should not be volatile",
2285 errmsg(
"function %s does not exist",
2291 errmsg(
"type analyze function %s must return type %s",
2314 errmsg(
"function %s does not exist",
2320 errmsg(
"type subscripting function %s must return type %s",
2330 errmsg(
"user-defined types cannot use subscripting function %s",
2362 errmsg(
"operator class \"%s\" does not accept data type %s",
2374 errmsg(
"data type %s has no default operator class for access method \"%s\"",
2376 errhint(
"You must specify an operator class for the range type or define a default operator class for the subtype.")));
2401 errmsg(
"function %s does not exist",
2407 errmsg(
"range canonical function %s must return range type",
2413 errmsg(
"range canonical function %s must be immutable",
2443 errmsg(
"function %s does not exist",
2449 errmsg(
"range subtype diff function %s must return type %s",
2451 "double precision")));
2456 errmsg(
"range subtype diff function %s must be immutable",
2483 errmsg(
"pg_type array OID value not set when in binary upgrade mode")));
2516 errmsg(
"pg_type multirange OID value not set when in binary upgrade mode")));
2549 errmsg(
"pg_type multirange array OID value not set when in binary upgrade mode")));
2931 errmsg(
"constraint \"%s\" of domain \"%s\" does not exist",
2935 (
errmsg(
"constraint \"%s\" of domain \"%s\" does not exist, skipping",
2988 elog(
ERROR,
"unrecognized node type: %d",
3039 typTup->typnotnull =
true;
3113 errmsg(
"constraint \"%s\" of domain \"%s\" does not exist",
3120 errmsg(
"constraint \"%s\" of domain \"%s\" is not a check constraint",
3189 for (
i = 0;
i <
rtc->natts;
i++)
3205 errmsg(
"column \"%s\" of table \"%s\" contains null values",
3270 for (
i = 0;
i <
rtc->natts;
i++)
3300 errmsg(
"column \"%s\" of table \"%s\" contains values that violate the new constraint",
3499 while (ptr > 0 &&
rtc->atts[ptr - 1] >
pg_depend->objsubid)
3501 rtc->atts[ptr] =
rtc->atts[ptr - 1];
3529 errmsg(
"%s is not a domain",
3563 errmsg(
"constraint \"%s\" for domain \"%s\" already exists",
3614 errmsg(
"cannot use table references in domain check constraint")));
3685 if (
strcmp(colname,
"value") == 0)
3719 errmsg(
"constraint \"%s\" for domain \"%s\" already exists",
3796 elog(
ERROR,
"cache lookup failed for type %u", typeOid);
3807 errmsg(
"%s is not a domain",
3819 errmsg(
"%s is a table's row type",
3829 errmsg(
"cannot alter array type %s",
3831 errhint(
"You can alter type %s, which will alter the array type as well.",
3878 errmsg(
"type \"%s\" does not exist",
3892 errmsg(
"%s is not a domain",
3904 errmsg(
"%s is a table's row type",
3914 errmsg(
"cannot alter array type %s",
3916 errhint(
"You can alter type %s, which will alter the array type as well.",
3927 errmsg(
"cannot alter multirange type %s",
3930 errhint(
"You can alter type %s, which will alter the multirange type as well.",
3992 elog(
ERROR,
"cache lookup failed for type %u", typeOid);
4038 elog(
ERROR,
"cache lookup failed for type %u", typeOid);
4077 errmsg(
"could not find multirange type for data type %s",
4108 errmsg(
"%s is not a domain",
4156 errmsg(
"cannot alter array type %s",
4158 errhint(
"You can alter type %s, which will alter the array type as well.",
4219 elog(
ERROR,
"cache lookup failed for type %u", typeOid);
4237 errmsg(
"type \"%s\" already exists in schema \"%s\"",
4258 errmsg(
"%s is a table's row type",
4261 errhint(
"Use %s instead.",
"ALTER TABLE")));
4316 elog(
ERROR,
"could not change schema dependency for type \"%s\"",
4370 foreach(
pl,
stmt->options)
4389 errmsg(
"storage \"%s\" not recognized",
a)));
4398 errmsg(
"fixed-size types must have storage PLAIN")));
4417 errmsg(
"cannot change type's storage to PLAIN")));
4445 else if (
strcmp(
defel->defname,
"typmod_in") == 0)
4456 else if (
strcmp(
defel->defname,
"typmod_out") == 0)
4479 else if (
strcmp(
defel->defname,
"subscript") == 0)
4510 errmsg(
"type attribute \"%s\" cannot be changed",
4515 errmsg(
"type attribute \"%s\" not recognized",
4528 errmsg(
"must be superuser to alter a type")));
4549 errmsg(
"%s is not a base type",
4558 errmsg(
"%s is not a base type",
4615 memset(nulls, 0,
sizeof(nulls));
Acl * aclnewowner(const Acl *old_acl, Oid oldOwnerId, Oid newOwnerId)
void check_can_set_role(Oid member, Oid role)
void aclcheck_error(AclResult aclerr, ObjectType objtype, const char *objectname)
AclResult object_aclcheck(Oid classid, Oid objectid, Oid roleid, AclMode mode)
bool object_ownercheck(Oid classid, Oid objectid, Oid roleid)
void aclcheck_error_type(AclResult aclerr, Oid typeOid)
ArrayType * construct_array_builtin(Datum *elems, int nelems, Oid elmtype)
static Datum values[MAXATTR]
#define CStringGetTextDatum(s)
#define TextDatumGetCString(d)
#define PG_USED_FOR_ASSERTS_ONLY
#define Assert(condition)
#define OidIsValid(objectId)
Oid GetNewOidWithIndex(Relation relation, Oid indexId, AttrNumber oidcolumn)
TypeName * defGetTypeName(DefElem *def)
int defGetTypeLength(DefElem *def)
char * defGetString(DefElem *def)
bool defGetBoolean(DefElem *def)
List * defGetQualifiedName(DefElem *def)
void errorConflictingDefElem(DefElem *defel, ParseState *pstate)
void performDeletion(const ObjectAddress *object, DropBehavior behavior, int flags)
bool object_address_present(const ObjectAddress *object, const ObjectAddresses *addrs)
void add_exact_object_address(const ObjectAddress *object, ObjectAddresses *addrs)
ObjectAddresses * new_object_addresses(void)
void free_object_addresses(ObjectAddresses *addrs)
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
ExprState * ExecPrepareExpr(Expr *node, EState *estate)
void ExecDropSingleTupleTableSlot(TupleTableSlot *slot)
void FreeExecutorState(EState *estate)
EState * CreateExecutorState(void)
#define GetPerTupleExprContext(estate)
#define ResetExprContext(econtext)
static Datum ExecEvalExprSwitchContext(ExprState *state, ExprContext *econtext, bool *isNull)
#define palloc_object(type)
#define palloc_array(type, count)
void systable_endscan(SysScanDesc sysscan)
HeapTuple systable_getnext(SysScanDesc sysscan)
SysScanDesc systable_beginscan(Relation heapRelation, Oid indexId, bool indexOK, Snapshot snapshot, int nkeys, ScanKey key)
Node * cookDefault(ParseState *pstate, Node *raw_default, Oid atttypid, int32 atttypmod, const char *attname, char attgenerated)
HeapTuple heap_modify_tuple(HeapTuple tuple, TupleDesc tupleDesc, const Datum *replValues, const bool *replIsnull, const bool *doReplace)
HeapTuple heap_copytuple(HeapTuple tuple)
void heap_freetuple(HeapTuple htup)
#define HeapTupleIsValid(tuple)
static Datum heap_getattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, bool *isnull)
static void * GETSTRUCT(const HeapTupleData *tuple)
Oid GetDefaultOpClass(Oid type_id, Oid am_id)
void CatalogTupleUpdate(Relation heapRel, const ItemPointerData *otid, HeapTuple tup)
void CatalogTupleDelete(Relation heapRel, const ItemPointerData *tid)
void CacheInvalidateHeapTuple(Relation relation, HeapTuple tuple, HeapTuple newtuple)
List * lappend(List *list, void *datum)
List * list_concat(List *list1, const List *list2)
#define AccessExclusiveLock
#define ShareUpdateExclusiveLock
Oid get_element_type(Oid typid)
Oid get_opclass_input_type(Oid opclass)
Oid get_multirange_range(Oid multirangeOid)
bool get_typisdefined(Oid typid)
void get_typlenbyvalalign(Oid typid, int16 *typlen, bool *typbyval, char *typalign)
char get_rel_relkind(Oid relid)
Oid get_typcollation(Oid typid)
char func_volatile(Oid funcid)
char * get_func_name(Oid funcid)
Oid get_range_multirange(Oid rangeOid)
bool type_is_collatable(Oid typid)
int16 get_typlen(Oid typid)
char get_typtype(Oid typid)
char * get_namespace_name(Oid nspid)
Oid get_array_type(Oid typid)
Oid get_func_rettype(Oid funcid)
TypeName * makeTypeNameFromNameList(List *names)
void pfree(void *pointer)
Oid RangeVarGetAndCheckCreationNamespace(RangeVar *relation, LOCKMODE lockmode, Oid *existing_relation_id)
char * NameListToString(const List *names)
Oid QualifiedNameGetCreationNamespace(const List *names, char **objname_p)
Oid LookupCreationNamespace(const char *nspname)
void RangeVarAdjustRelationPersistence(RangeVar *newRelation, Oid nspid)
Oid get_collation_oid(List *collname, bool missing_ok)
void CheckSetNamespace(Oid oldNspOid, Oid nspOid)
#define IsA(nodeptr, _type_)
#define castNode(_type_, nodeptr)
#define InvokeObjectPostAlterHook(classId, objectId, subId)
const ObjectAddress InvalidObjectAddress
#define ObjectAddressSet(addr, class_id, object_id)
oidvector * buildoidvector(const Oid *oids, int n)
Oid get_opclass_oid(Oid amID, List *opclassname, bool missing_ok)
char * nodeToString(const void *obj)
bool IsBinaryCoercible(Oid srctype, Oid targettype)
Node * coerce_to_boolean(ParseState *pstate, Node *node, const char *constructName)
void assign_expr_collations(ParseState *pstate, Node *expr)
Node * transformExpr(ParseState *pstate, Node *expr, ParseExprKind exprKind)
const char * func_signature_string(List *funcname, int nargs, List *argnames, const Oid *argtypes)
Oid LookupFuncName(List *funcname, int nargs, const Oid *argtypes, bool missing_ok)
static bool isCompositeType(Oid typid)
int parser_errposition(ParseState *pstate, int location)
ParseState * make_parsestate(ParseState *parentParseState)
char * TypeNameToString(const TypeName *typeName)
Type LookupTypeName(ParseState *pstate, const TypeName *typeName, int32 *typmod_p, bool missing_ok)
Type typenameType(ParseState *pstate, const TypeName *typeName, int32 *typmod_p)
Oid typenameTypeId(ParseState *pstate, const TypeName *typeName)
@ CONSTR_ATTR_NOT_DEFERRABLE
@ CONSTR_ATTR_NOT_ENFORCED
FormData_pg_attribute * Form_pg_attribute
ObjectAddress CastCreate(Oid sourcetypeid, Oid targettypeid, Oid funcid, Oid incastid, Oid outcastid, char castcontext, char castmethod, DependencyType behavior)
Oid CreateConstraintEntry(const char *constraintName, Oid constraintNamespace, char constraintType, bool isDeferrable, bool isDeferred, bool isEnforced, bool isValidated, Oid parentConstrId, Oid relId, const int16 *constraintKey, int constraintNKeys, int constraintNTotalKeys, Oid domainId, Oid indexRelId, Oid foreignRelId, const int16 *foreignKey, const Oid *pfEqOp, const Oid *ppEqOp, const Oid *ffEqOp, int foreignNKeys, char foreignUpdateType, char foreignDeleteType, const int16 *fkDeleteSetCols, int numFkDeleteSetCols, char foreignMatchType, const Oid *exclOp, Node *conExpr, const char *conBin, bool conIsLocal, int16 conInhCount, bool conNoInherit, bool conPeriod, bool is_internal)
bool ConstraintNameIsUsed(ConstraintCategory conCat, Oid objId, const char *conname)
HeapTuple findDomainNotNullConstraint(Oid typid)
void AlterConstraintNamespaces(Oid ownerId, Oid oldNspId, Oid newNspId, bool isType, ObjectAddresses *objsMoved)
char * ChooseConstraintName(const char *name1, const char *name2, const char *label, Oid namespaceid, List *others)
FormData_pg_constraint * Form_pg_constraint
void recordDependencyOn(const ObjectAddress *depender, const ObjectAddress *referenced, DependencyType behavior)
long changeDependencyFor(Oid classId, Oid objectId, Oid refClassId, Oid oldRefObjectId, Oid newRefObjectId)
FormData_pg_depend * Form_pg_depend
void RenameEnumLabel(Oid enumTypeOid, const char *oldVal, const char *newVal)
void EnumValuesDelete(Oid enumTypeOid)
void AddEnumLabel(Oid enumTypeOid, const char *newVal, const char *neighbor, bool newValIsAfter, bool skipIfExists)
void EnumValuesCreate(Oid enumTypeOid, List *vals)
static int list_length(const List *l)
ObjectAddress ProcedureCreate(const char *procedureName, Oid procNamespace, bool replace, bool returnsSet, Oid returnType, Oid proowner, Oid languageObjectId, Oid languageValidator, const char *prosrc, const char *probin, Node *prosqlbody, char prokind, bool security_definer, bool isLeakProof, bool isStrict, char volatility, char parallel, oidvector *parameterTypes, Datum allParameterTypes, Datum parameterModes, Datum parameterNames, List *parameterDefaults, Datum trftypes, List *trfoids, Datum proconfig, Oid prosupport, float4 procost, float4 prorows)
void RangeCreate(Oid rangeTypeOid, Oid rangeSubType, Oid rangeCollation, Oid rangeSubOpclass, RegProcedure rangeCanonical, RegProcedure rangeSubDiff, Oid multirangeTypeOid, RegProcedure rangeConstruct2, RegProcedure rangeConstruct3, RegProcedure mltrngConstruct0, RegProcedure mltrngConstruct1, RegProcedure mltrngConstruct2)
void RangeDelete(Oid rangeTypeOid)
void changeDependencyOnOwner(Oid classId, Oid objectId, Oid newOwnerId)
void GenerateTypeDependencies(HeapTuple typeTuple, Relation typeCatalog, Node *defaultExpr, void *typacl, char relationKind, bool isImplicitArray, bool isDependentType, bool makeExtensionDep, bool rebuild)
void RenameTypeInternal(Oid typeOid, const char *newTypeName, Oid typeNamespace)
ObjectAddress TypeCreate(Oid newTypeOid, const char *typeName, Oid typeNamespace, Oid relationOid, char relationKind, Oid ownerId, int16 internalSize, char typeType, char typeCategory, bool typePreferred, char typDelim, Oid inputProcedure, Oid outputProcedure, Oid receiveProcedure, Oid sendProcedure, Oid typmodinProcedure, Oid typmodoutProcedure, Oid analyzeProcedure, Oid subscriptProcedure, Oid elementType, bool isImplicitArray, Oid arrayType, Oid baseType, const char *defaultTypeValue, char *defaultTypeBin, bool passedByValue, char alignment, char storage, int32 typeMod, int32 typNDims, bool typeNotNull, Oid typeCollation)
bool moveArrayTypeName(Oid typeOid, const char *typeName, Oid typeNamespace)
ObjectAddress TypeShellMake(const char *typeName, Oid typeNamespace, Oid ownerId)
char * makeMultirangeTypeName(const char *rangeTypeName, Oid typeNamespace)
char * makeArrayTypeName(const char *typeName, Oid typeNamespace)
FormData_pg_type * Form_pg_type
int pg_strcasecmp(const char *s1, const char *s2)
static bool DatumGetBool(Datum X)
static Datum PointerGetDatum(const void *X)
static Datum ObjectIdGetDatum(Oid X)
static Datum NameGetDatum(const NameData *X)
static Datum CStringGetDatum(const char *X)
static Datum CharGetDatum(char X)
void * stringToNode(const char *str)
#define RelationGetRelid(relation)
#define RelationGetDescr(relation)
#define RelationGetNumberOfAttributes(relation)
#define RelationGetRelationName(relation)
int errtablecol(Relation rel, int attnum)
char * deparse_expression(Node *expr, List *dpcontext, bool forceprefix, bool showimplicit)
void ScanKeyInit(ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument)
Snapshot GetLatestSnapshot(void)
void UnregisterSnapshot(Snapshot snapshot)
Snapshot RegisterSnapshot(Snapshot snapshot)
void relation_close(Relation relation, LOCKMODE lockmode)
Relation relation_open(Oid relationId, LOCKMODE lockmode)
void check_stack_depth(void)
#define BTEqualStrategyNumber
#define ERRCODE_DUPLICATE_OBJECT
PreParseColumnRefHook p_pre_columnref_hook
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
Datum SysCacheGetAttr(int cacheId, HeapTuple tup, AttrNumber attributeNumber, bool *isNull)
Datum SysCacheGetAttrNotNull(int cacheId, HeapTuple tup, AttrNumber attributeNumber)
#define SearchSysCacheCopy1(cacheId, key1)
#define SearchSysCacheExists2(cacheId, key1, key2)
#define GetSysCacheOid2(cacheId, oidcol, key1, key2)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)
TupleTableSlot * table_slot_create(Relation relation, List **reglist)
static void table_endscan(TableScanDesc scan)
static bool table_scan_getnextslot(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *slot)
static TableScanDesc table_beginscan(Relation rel, Snapshot snapshot, int nkeys, ScanKeyData *key)
void AlterRelationNamespaceInternal(Relation classRel, Oid relOid, Oid oldNspOid, Oid newNspOid, bool hasDependEntry, ObjectAddresses *objsMoved)
void ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing, LOCKMODE lockmode)
void find_composite_type_dependencies(Oid typeOid, Relation origRelation, const char *origTypeName)
ObjectAddress DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId, ObjectAddress *typaddress, const char *queryString)
void RenameRelationInternal(Oid myrelid, const char *newrelname, bool is_internal, bool is_index)
static FormData_pg_attribute * TupleDescAttr(TupleDesc tupdesc, int i)
static Datum slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull)
static bool slot_attisnull(TupleTableSlot *slot, int attnum)
ObjectAddress AlterDomainNotNull(List *names, bool notNull)
static Oid findTypeReceiveFunction(List *procname, Oid typeOid)
Oid AssignTypeMultirangeOid(void)
Oid binary_upgrade_next_mrng_array_pg_type_oid
static void AlterTypeRecurse(Oid typeOid, bool isImplicitArray, HeapTuple tup, Relation catalog, AlterTypeRecurseParams *atparams)
static void checkEnumOwner(HeapTuple tup)
static Oid findTypeAnalyzeFunction(List *procname, Oid typeOid)
static Oid findRangeSubOpclass(List *opcname, Oid subtype)
Oid AlterTypeNamespace_oid(Oid typeOid, Oid nspOid, bool ignoreDependent, ObjectAddresses *objsMoved)
Oid binary_upgrade_next_mrng_pg_type_oid
static void makeMultirangeConstructors(const char *name, Oid namespace, Oid multirangeOid, Oid rangeOid, Oid rangeArrayOid, Oid *mltrngConstruct0_p, Oid *mltrngConstruct1_p, Oid *mltrngConstruct2_p)
ObjectAddress DefineType(ParseState *pstate, List *names, List *parameters)
static Oid findRangeSubtypeDiffFunction(List *procname, Oid subtype)
static Oid findTypeOutputFunction(List *procname, Oid typeOid)
ObjectAddress DefineEnum(CreateEnumStmt *stmt)
static Oid findTypeSendFunction(List *procname, Oid typeOid)
static char * domainAddCheckConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid, int typMod, Constraint *constr, const char *domainName, ObjectAddress *constrAddr)
ObjectAddress AlterTypeOwner(List *names, Oid newOwnerId, ObjectType objecttype)
static Oid findRangeCanonicalFunction(List *procname, Oid typeOid)
ObjectAddress AlterDomainDropConstraint(List *names, const char *constrName, DropBehavior behavior, bool missing_ok)
void AlterTypeOwnerInternal(Oid typeOid, Oid newOwnerId)
ObjectAddress AlterEnum(AlterEnumStmt *stmt)
ObjectAddress AlterDomainAddConstraint(List *names, Node *newConstraint, ObjectAddress *constrAddr)
void RemoveTypeById(Oid typeOid)
ObjectAddress DefineDomain(ParseState *pstate, CreateDomainStmt *stmt)
static void makeRangeConstructors(const char *name, Oid namespace, Oid rangeOid, Oid subtype, Oid *rangeConstruct2_p, Oid *rangeConstruct3_p)
ObjectAddress AlterDomainValidateConstraint(List *names, const char *constrName)
static Oid findTypeSubscriptingFunction(List *procname, Oid typeOid)
static Oid findTypeTypmodoutFunction(List *procname)
static Oid findTypeTypmodinFunction(List *procname)
ObjectAddress AlterDomainDefault(List *names, Node *defaultRaw)
Oid binary_upgrade_next_array_pg_type_oid
ObjectAddress RenameType(RenameStmt *stmt)
Oid AssignTypeArrayOid(void)
static Oid findTypeInputFunction(List *procname, Oid typeOid)
void checkDomainOwner(HeapTuple tup)
void AlterTypeOwner_oid(Oid typeOid, Oid newOwnerId, bool hasDependEntry)
ObjectAddress AlterTypeNamespace(List *names, const char *newschema, ObjectType objecttype, Oid *oldschema)
static List * get_rels_with_domain(Oid domainOid, LOCKMODE lockmode)
ObjectAddress DefineCompositeType(RangeVar *typevar, List *coldeflist)
static void domainAddNotNullConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid, int typMod, Constraint *constr, const char *domainName, ObjectAddress *constrAddr)
Oid AssignTypeMultirangeArrayOid(void)
ObjectAddress AlterType(AlterTypeStmt *stmt)
Oid AlterTypeNamespaceInternal(Oid typeOid, Oid nspOid, bool isImplicitArray, bool ignoreDependent, bool errorOnTableType, ObjectAddresses *objsMoved)
static void validateDomainNotNullConstraint(Oid domainoid)
ObjectAddress DefineRange(ParseState *pstate, CreateRangeStmt *stmt)
static void validateDomainCheckConstraint(Oid domainoid, const char *ccbin, LOCKMODE lockmode)
static Node * replace_domain_constraint_value(ParseState *pstate, ColumnRef *cref)
bool contain_var_clause(Node *node)
void CommandCounterIncrement(void)