|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/genam.h"#include "access/htup_details.h"#include "access/relation.h"#include "access/table.h"#include "access/tableam.h"#include "access/xact.h"#include "catalog/binary_upgrade.h"#include "catalog/catalog.h"#include "catalog/heap.h"#include "catalog/objectaccess.h"#include "catalog/pg_am.h"#include "catalog/pg_authid.h"#include "catalog/pg_cast.h"#include "catalog/pg_collation.h"#include "catalog/pg_constraint.h"#include "catalog/pg_depend.h"#include "catalog/pg_enum.h"#include "catalog/pg_language.h"#include "catalog/pg_namespace.h"#include "catalog/pg_proc.h"#include "catalog/pg_range.h"#include "catalog/pg_type.h"#include "commands/defrem.h"#include "commands/tablecmds.h"#include "commands/typecmds.h"#include "executor/executor.h"#include "miscadmin.h"#include "nodes/makefuncs.h"#include "optimizer/optimizer.h"#include "parser/parse_coerce.h"#include "parser/parse_collate.h"#include "parser/parse_expr.h"#include "parser/parse_func.h"#include "parser/parse_type.h"#include "utils/builtins.h"#include "utils/fmgroids.h"#include "utils/inval.h"#include "utils/lsyscache.h"#include "utils/rel.h"#include "utils/ruleutils.h"#include "utils/snapmgr.h"#include "utils/syscache.h"
Go to the source code of this file.
Data Structures | |
| struct | RelToCheck |
| struct | AlterTypeRecurseParams |
Variables | |
| Oid | binary_upgrade_next_array_pg_type_oid = InvalidOid |
| Oid | binary_upgrade_next_mrng_pg_type_oid = InvalidOid |
| Oid | binary_upgrade_next_mrng_array_pg_type_oid = InvalidOid |
| ObjectAddress AlterDomainAddConstraint | ( | List * | names, |
| Node * | newConstraint, | ||
| ObjectAddress * | constrAddr | ||
| ) |
Definition at line 2960 of file typecmds.c.
References Assert, CacheInvalidateHeapTuple(), CatalogTupleUpdate(), checkDomainOwner(), CONSTR_CHECK, CONSTR_NOTNULL, Constraint::contype, domainAddCheckConstraint(), domainAddNotNullConstraint(), elog, ERROR, fb(), GETSTRUCT(), HeapTupleIsValid, InvalidObjectAddress, IsA, makeTypeNameFromNameList(), NameStr, nodeTag, ObjectAddressSet, ObjectIdGetDatum(), RowExclusiveLock, SearchSysCacheCopy1, ShareLock, Constraint::skip_validation, table_close(), table_open(), typenameTypeId(), validateDomainCheckConstraint(), and validateDomainNotNullConstraint().
Referenced by ATExecCmd(), and ProcessUtilitySlow().
| ObjectAddress AlterDomainDefault | ( | List * | names, |
| Node * | defaultRaw | ||
| ) |
Definition at line 2639 of file typecmds.c.
References CatalogTupleUpdate(), checkDomainOwner(), cookDefault(), CStringGetTextDatum, deparse_expression(), elog, ERROR, fb(), GenerateTypeDependencies(), GETSTRUCT(), heap_freetuple(), heap_modify_tuple(), HeapTupleIsValid, InvokeObjectPostAlterHook, IsA, make_parsestate(), makeTypeNameFromNameList(), NameStr, NIL, nodeToString(), ObjectAddressSet, ObjectIdGetDatum(), RelationGetDescr, RowExclusiveLock, SearchSysCacheCopy1, table_close(), table_open(), and typenameTypeId().
Referenced by ProcessUtilitySlow().
| ObjectAddress AlterDomainDropConstraint | ( | List * | names, |
| const char * | constrName, | ||
| DropBehavior | behavior, | ||
| bool | missing_ok | ||
| ) |
Definition at line 2854 of file typecmds.c.
References BTEqualStrategyNumber, CacheInvalidateHeapTuple(), CatalogTupleUpdate(), checkDomainOwner(), CStringGetDatum(), elog, ereport, errcode(), errmsg(), ERROR, fb(), GETSTRUCT(), HeapTupleIsValid, InvalidOid, makeTypeNameFromNameList(), NOTICE, ObjectAddressSet, ObjectIdGetDatum(), performDeletion(), RowExclusiveLock, ScanKeyInit(), SearchSysCacheCopy1, systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), table_open(), TypeNameToString(), and typenameTypeId().
Referenced by ProcessUtilitySlow().
| ObjectAddress AlterDomainNotNull | ( | List * | names, |
| bool | notNull | ||
| ) |
Definition at line 2768 of file typecmds.c.
References CatalogTupleUpdate(), checkDomainOwner(), CONSTR_NOTNULL, Constraint::contype, domainAddNotNullConstraint(), DROP_RESTRICT, elog, ERROR, fb(), findDomainNotNullConstraint(), GETSTRUCT(), heap_freetuple(), HeapTupleIsValid, Constraint::initially_valid, InvalidObjectAddress, InvokeObjectPostAlterHook, Constraint::location, makeNode, makeTypeNameFromNameList(), NameStr, ObjectAddressSet, ObjectIdGetDatum(), performDeletion(), RowExclusiveLock, SearchSysCacheCopy1, table_close(), table_open(), typenameTypeId(), and validateDomainNotNullConstraint().
Referenced by ProcessUtilitySlow().
| ObjectAddress AlterDomainValidateConstraint | ( | List * | names, |
| const char * | constrName | ||
| ) |
Definition at line 3057 of file typecmds.c.
References AccessShareLock, BTEqualStrategyNumber, CatalogTupleUpdate(), checkDomainOwner(), CStringGetDatum(), elog, ereport, errcode(), errmsg(), ERROR, fb(), GETSTRUCT(), heap_copytuple(), heap_freetuple(), HeapTupleIsValid, InvalidOid, InvokeObjectPostAlterHook, makeTypeNameFromNameList(), ObjectAddressSet, ObjectIdGetDatum(), ReleaseSysCache(), RowExclusiveLock, ScanKeyInit(), SearchSysCache1(), ShareUpdateExclusiveLock, SysCacheGetAttrNotNull(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), table_open(), TextDatumGetCString, TypeNameToString(), typenameTypeId(), val, and validateDomainCheckConstraint().
Referenced by ProcessUtilitySlow().
| ObjectAddress AlterEnum | ( | AlterEnumStmt * | stmt | ) |
Definition at line 1307 of file typecmds.c.
References AddEnumLabel(), checkEnumOwner(), elog, ERROR, fb(), HeapTupleIsValid, InvokeObjectPostAlterHook, makeTypeNameFromNameList(), ObjectAddressSet, ObjectIdGetDatum(), ReleaseSysCache(), RenameEnumLabel(), SearchSysCache1(), stmt, and typenameTypeId().
Referenced by ProcessUtilitySlow().
| ObjectAddress AlterType | ( | AlterTypeStmt * | stmt | ) |
Definition at line 4347 of file typecmds.c.
References a, aclcheck_error_type(), ACLCHECK_NOT_OWNER, AlterTypeRecurse(), defGetQualifiedName(), defGetString(), ereport, errcode(), errmsg(), ERROR, fb(), findTypeAnalyzeFunction(), findTypeReceiveFunction(), findTypeSendFunction(), findTypeSubscriptingFunction(), findTypeTypmodinFunction(), findTypeTypmodoutFunction(), format_type_be(), GETSTRUCT(), GetUserId(), InvalidOid, lfirst, makeTypeNameFromNameList(), object_ownercheck(), ObjectAddressSet, pg_strcasecmp(), ReleaseSysCache(), RowExclusiveLock, stmt, superuser(), table_close(), table_open(), typenameType(), and typeTypeId().
Referenced by ProcessUtilitySlow().
| ObjectAddress AlterTypeNamespace | ( | List * | names, |
| const char * | newschema, | ||
| ObjectType | objecttype, | ||
| Oid * | oldschema | ||
| ) |
Definition at line 4090 of file typecmds.c.
References AlterTypeNamespace_oid(), ereport, errcode(), errmsg(), ERROR, fb(), format_type_be(), free_object_addresses(), get_typtype(), LookupCreationNamespace(), makeTypeNameFromNameList(), new_object_addresses(), OBJECT_DOMAIN, ObjectAddressSet, and typenameTypeId().
Referenced by ExecAlterObjectSchemaStmt().
| Oid AlterTypeNamespace_oid | ( | Oid | typeOid, |
| Oid | nspOid, | ||
| bool | ignoreDependent, | ||
| ObjectAddresses * | objsMoved | ||
| ) |
Definition at line 4139 of file typecmds.c.
References aclcheck_error_type(), ACLCHECK_NOT_OWNER, AlterTypeNamespaceInternal(), ereport, errcode(), errhint(), errmsg(), ERROR, fb(), format_type_be(), get_array_type(), get_element_type(), GetUserId(), InvalidOid, object_ownercheck(), and OidIsValid.
Referenced by AlterObjectNamespace_oid(), and AlterTypeNamespace().
| Oid AlterTypeNamespaceInternal | ( | Oid | typeOid, |
| Oid | nspOid, | ||
| bool | isImplicitArray, | ||
| bool | ignoreDependent, | ||
| bool | errorOnTableType, | ||
| ObjectAddresses * | objsMoved | ||
| ) |
Definition at line 4191 of file typecmds.c.
References add_exact_object_address(), AlterConstraintNamespaces(), AlterRelationNamespaceInternal(), AlterTypeNamespaceInternal(), CatalogTupleUpdate(), changeDependencyFor(), CheckSetNamespace(), ObjectAddress::classId, elog, ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errhint(), errmsg(), ERROR, fb(), format_type_be(), get_namespace_name(), get_rel_relkind(), GETSTRUCT(), heap_freetuple(), HeapTupleIsValid, InvalidOid, InvokeObjectPostAlterHook, isCompositeType(), NameGetDatum(), NameStr, object_address_present(), ObjectIdGetDatum(), OidIsValid, RowExclusiveLock, SearchSysCacheCopy1, SearchSysCacheExists2, table_close(), and table_open().
Referenced by AlterTableNamespaceInternal(), AlterTypeNamespace_oid(), and AlterTypeNamespaceInternal().
| ObjectAddress AlterTypeOwner | ( | List * | names, |
| Oid | newOwnerId, | ||
| ObjectType | objecttype | ||
| ) |
Definition at line 3857 of file typecmds.c.
References ACL_CREATE, aclcheck_error(), aclcheck_error_type(), ACLCHECK_NOT_OWNER, ACLCHECK_OK, AlterTypeOwner_oid(), check_can_set_role(), ereport, errcode(), errhint(), errmsg(), ERROR, fb(), format_type_be(), get_multirange_range(), get_namespace_name(), get_rel_relkind(), GETSTRUCT(), GetUserId(), heap_copytuple(), LookupTypeName(), makeTypeNameFromNameList(), object_aclcheck(), OBJECT_DOMAIN, object_ownercheck(), OBJECT_SCHEMA, ObjectAddressSet, OidIsValid, ReleaseSysCache(), RowExclusiveLock, superuser(), table_close(), table_open(), TypeNameToString(), and typeTypeId().
Referenced by ExecAlterOwnerStmt().
Definition at line 3982 of file typecmds.c.
References AccessExclusiveLock, AlterTypeOwnerInternal(), ATExecChangeOwner(), changeDependencyOnOwner(), elog, ERROR, fb(), GETSTRUCT(), HeapTupleIsValid, InvokeObjectPostAlterHook, ObjectIdGetDatum(), ReleaseSysCache(), RowExclusiveLock, SearchSysCache1(), table_close(), and table_open().
Referenced by AlterTypeOwner(), and shdepReassignOwned_Owner().
Definition at line 4022 of file typecmds.c.
References aclnewowner(), AlterTypeOwnerInternal(), CatalogTupleUpdate(), DatumGetAclP, elog, ereport, errcode(), errmsg(), ERROR, fb(), format_type_be(), get_range_multirange(), GETSTRUCT(), heap_getattr(), heap_modify_tuple(), HeapTupleIsValid, ObjectIdGetDatum(), OidIsValid, PointerGetDatum(), RelationGetDescr, RowExclusiveLock, SearchSysCacheCopy1, table_close(), and table_open().
Referenced by AlterTypeOwner_oid(), AlterTypeOwnerInternal(), and ATExecChangeOwner().
|
static |
Definition at line 4598 of file typecmds.c.
References AlterTypeRecurse(), BTEqualStrategyNumber, CatalogTupleUpdate(), CharGetDatum(), check_stack_depth(), elog, ERROR, fb(), GenerateTypeDependencies(), GETSTRUCT(), heap_modify_tuple(), HeapTupleIsValid, InvalidOid, InvokeObjectPostAlterHook, ObjectIdGetDatum(), OidIsValid, RelationGetDescr, ReleaseSysCache(), ScanKeyInit(), SearchSysCache1(), systable_beginscan(), systable_endscan(), systable_getnext(), and values.
Referenced by AlterType(), and AlterTypeRecurse().
Definition at line 2473 of file typecmds.c.
References AccessShareLock, binary_upgrade_next_array_pg_type_oid, ereport, errcode(), errmsg(), ERROR, fb(), GetNewOidWithIndex(), InvalidOid, IsBinaryUpgrade, OidIsValid, table_close(), and table_open().
Referenced by DefineDomain(), DefineEnum(), DefineRange(), DefineType(), and heap_create_with_catalog().
Definition at line 2539 of file typecmds.c.
References AccessShareLock, binary_upgrade_next_mrng_array_pg_type_oid, ereport, errcode(), errmsg(), ERROR, fb(), GetNewOidWithIndex(), InvalidOid, IsBinaryUpgrade, OidIsValid, table_close(), and table_open().
Referenced by DefineRange().
Definition at line 2506 of file typecmds.c.
References AccessShareLock, binary_upgrade_next_mrng_pg_type_oid, ereport, errcode(), errmsg(), ERROR, fb(), GetNewOidWithIndex(), InvalidOid, IsBinaryUpgrade, OidIsValid, table_close(), and table_open().
Referenced by DefineRange().
Definition at line 3521 of file typecmds.c.
References aclcheck_error_type(), ACLCHECK_NOT_OWNER, ereport, errcode(), errmsg(), ERROR, fb(), format_type_be(), GETSTRUCT(), GetUserId(), and object_ownercheck().
Referenced by AlterDomainAddConstraint(), AlterDomainDefault(), AlterDomainDropConstraint(), AlterDomainNotNull(), AlterDomainValidateConstraint(), and RenameConstraint().
Definition at line 1355 of file typecmds.c.
References aclcheck_error_type(), ACLCHECK_NOT_OWNER, ereport, errcode(), errmsg(), ERROR, fb(), format_type_be(), GETSTRUCT(), GetUserId(), and object_ownercheck().
Referenced by AlterEnum().
| ObjectAddress DefineCompositeType | ( | RangeVar * | typevar, |
| List * | coldeflist | ||
| ) |
Definition at line 2581 of file typecmds.c.
References CreateStmt::constraints, CStringGetDatum(), DefineRelation(), ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errmsg(), ERROR, fb(), GetSysCacheOid2, CreateStmt::if_not_exists, CreateStmt::inhRelations, InvalidOid, makeNode, moveArrayTypeName(), NIL, NoLock, ObjectIdGetDatum(), OidIsValid, CreateStmt::oncommit, ONCOMMIT_NOOP, CreateStmt::options, RangeVarAdjustRelationPersistence(), RangeVarGetAndCheckCreationNamespace(), CreateStmt::relation, RangeVar::relname, CreateStmt::tableElts, and CreateStmt::tablespacename.
Referenced by ProcessUtilitySlow().
| ObjectAddress DefineDomain | ( | ParseState * | pstate, |
| CreateDomainStmt * | stmt | ||
| ) |
Definition at line 699 of file typecmds.c.
References ACL_CREATE, ACL_USAGE, aclcheck_error(), aclcheck_error_type(), ACLCHECK_OK, AssignTypeArrayOid(), CommandCounterIncrement(), CONSTR_ATTR_DEFERRABLE, CONSTR_ATTR_DEFERRED, CONSTR_ATTR_ENFORCED, CONSTR_ATTR_IMMEDIATE, CONSTR_ATTR_NOT_DEFERRABLE, CONSTR_ATTR_NOT_ENFORCED, CONSTR_CHECK, CONSTR_DEFAULT, CONSTR_EXCLUSION, CONSTR_FOREIGN, CONSTR_GENERATED, CONSTR_IDENTITY, CONSTR_NOTNULL, CONSTR_NULL, CONSTR_PRIMARY, CONSTR_UNIQUE, Constraint::contype, cookDefault(), CStringGetDatum(), deparse_expression(), domainAddCheckConstraint(), domainAddNotNullConstraint(), elog, ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errmsg(), ERROR, fb(), format_type_be(), get_collation_oid(), get_namespace_name(), GETSTRUCT(), GetSysCacheOid2, GetUserId(), InvalidOid, Constraint::is_no_inherit, IsA, lfirst, list_length(), Constraint::location, makeArrayTypeName(), moveArrayTypeName(), NIL, nodeTag, nodeToString(), object_aclcheck(), OBJECT_SCHEMA, ObjectAddress::objectId, ObjectIdGetDatum(), OidIsValid, parser_errposition(), pfree(), QualifiedNameGetCreationNamespace(), Constraint::raw_expr, ReleaseSysCache(), stmt, storage, SysCacheGetAttr(), TextDatumGetCString, TypeCreate(), TypeNameToString(), and typenameType().
Referenced by ProcessUtilitySlow().
| ObjectAddress DefineEnum | ( | CreateEnumStmt * | stmt | ) |
Definition at line 1183 of file typecmds.c.
References ACL_CREATE, aclcheck_error(), ACLCHECK_OK, AssignTypeArrayOid(), CStringGetDatum(), DEFAULT_TYPDELIM, EnumValuesCreate(), ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errmsg(), ERROR, fb(), get_namespace_name(), GetSysCacheOid2, GetUserId(), InvalidOid, makeArrayTypeName(), moveArrayTypeName(), object_aclcheck(), OBJECT_SCHEMA, ObjectIdGetDatum(), OidIsValid, pfree(), QualifiedNameGetCreationNamespace(), stmt, and TypeCreate().
Referenced by ProcessUtilitySlow().
| ObjectAddress DefineRange | ( | ParseState * | pstate, |
| CreateRangeStmt * | stmt | ||
| ) |
Definition at line 1382 of file typecmds.c.
References ACL_CREATE, aclcheck_error(), ACLCHECK_OK, Assert, AssignTypeArrayOid(), AssignTypeMultirangeArrayOid(), AssignTypeMultirangeOid(), CastCreate(), CommandCounterIncrement(), CStringGetDatum(), DEFAULT_TYPDELIM, defGetQualifiedName(), defGetTypeName(), DEPENDENCY_INTERNAL, ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errhint(), errmsg(), ERROR, errorConflictingDefElem(), fb(), findRangeCanonicalFunction(), findRangeSubOpclass(), findRangeSubtypeDiffFunction(), format_type_be(), get_collation_oid(), get_namespace_name(), get_typcollation(), get_typisdefined(), get_typlenbyvalalign(), get_typtype(), GetSysCacheOid2, GetUserId(), InvalidOid, lfirst, makeArrayTypeName(), makeMultirangeConstructors(), makeMultirangeTypeName(), makeRangeConstructors(), moveArrayTypeName(), NIL, object_aclcheck(), OBJECT_SCHEMA, ObjectAddress::objectId, ObjectIdGetDatum(), OidIsValid, pfree(), PG_USED_FOR_ASSERTS_ONLY, QualifiedNameGetCreationNamespace(), RangeCreate(), stmt, type_is_collatable(), TypeCreate(), and typenameTypeId().
Referenced by ProcessUtilitySlow().
| ObjectAddress DefineType | ( | ParseState * | pstate, |
| List * | names, | ||
| List * | parameters | ||
| ) |
Definition at line 154 of file typecmds.c.
References a, ACL_CREATE, aclcheck_error(), ACLCHECK_NOT_OWNER, ACLCHECK_OK, Assert, AssignTypeArrayOid(), CStringGetDatum(), DEFAULT_TYPDELIM, defGetBoolean(), defGetQualifiedName(), defGetString(), defGetTypeLength(), defGetTypeName(), ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errhint(), errmsg(), ERROR, errorConflictingDefElem(), fb(), findTypeAnalyzeFunction(), findTypeInputFunction(), findTypeOutputFunction(), findTypeReceiveFunction(), findTypeSendFunction(), findTypeSubscriptingFunction(), findTypeTypmodinFunction(), findTypeTypmodoutFunction(), format_type_be(), get_namespace_name(), get_typisdefined(), get_typlen(), get_typtype(), GETSTRUCT(), GetSysCacheOid2, GetUserId(), InvalidOid, lfirst, makeArrayTypeName(), moveArrayTypeName(), NameListToString(), NIL, object_aclcheck(), OBJECT_FUNCTION, object_ownercheck(), OBJECT_SCHEMA, ObjectAddress::objectId, ObjectIdGetDatum(), OidIsValid, parser_errposition(), pfree(), pg_strcasecmp(), QualifiedNameGetCreationNamespace(), ReleaseSysCache(), storage, superuser(), TypeCreate(), typenameType(), typenameTypeId(), TypeShellMake(), and WARNING.
Referenced by ProcessUtilitySlow().
|
static |
Definition at line 3541 of file typecmds.c.
References Assert, assign_expr_collations(), ChooseConstraintName(), coerce_to_boolean(), Constraint::conname, CONSTR_CHECK, CONSTRAINT_DOMAIN, ConstraintNameIsUsed(), contain_var_clause(), Constraint::contype, CreateConstraintEntry(), ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errmsg(), ERROR, EXPR_KIND_DOMAIN_CHECK, fb(), get_typcollation(), InvalidOid, make_parsestate(), makeNode, NIL, nodeToString(), ObjectAddressSet, ParseState::p_pre_columnref_hook, ParseState::p_ref_hook_state, ParseState::p_rtable, Constraint::raw_expr, replace_domain_constraint_value(), Constraint::skip_validation, and transformExpr().
Referenced by AlterDomainAddConstraint(), and DefineDomain().
|
static |
Definition at line 3701 of file typecmds.c.
References Assert, ChooseConstraintName(), Constraint::conname, CONSTR_NOTNULL, CONSTRAINT_DOMAIN, ConstraintNameIsUsed(), Constraint::contype, CreateConstraintEntry(), ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errmsg(), ERROR, fb(), InvalidOid, NIL, ObjectAddressSet, and Constraint::skip_validation.
Referenced by AlterDomainAddConstraint(), AlterDomainNotNull(), and DefineDomain().
Definition at line 2384 of file typecmds.c.
References ACL_EXECUTE, aclcheck_error(), ACLCHECK_OK, ereport, errcode(), errmsg(), ERROR, fb(), func_signature_string(), func_volatile(), get_func_name(), get_func_rettype(), GetUserId(), LookupFuncName(), NIL, object_aclcheck(), OBJECT_FUNCTION, and OidIsValid.
Referenced by DefineRange().
Definition at line 2345 of file typecmds.c.
References ereport, errcode(), errhint(), errmsg(), ERROR, fb(), format_type_be(), get_opclass_input_type(), get_opclass_oid(), GetDefaultOpClass(), IsBinaryCoercible(), NameListToString(), NIL, and OidIsValid.
Referenced by DefineRange().
Definition at line 2425 of file typecmds.c.
References ACL_EXECUTE, aclcheck_error(), ACLCHECK_OK, ereport, errcode(), errmsg(), ERROR, fb(), func_signature_string(), func_volatile(), get_func_name(), get_func_rettype(), GetUserId(), LookupFuncName(), NIL, object_aclcheck(), OBJECT_FUNCTION, and OidIsValid.
Referenced by DefineRange().
Definition at line 2271 of file typecmds.c.
References ereport, errcode(), errmsg(), ERROR, fb(), func_signature_string(), get_func_rettype(), LookupFuncName(), NameListToString(), NIL, and OidIsValid.
Referenced by AlterType(), and DefineType().
Definition at line 2016 of file typecmds.c.
References ereport, errcode(), errmsg(), ERROR, fb(), format_type_be(), func_signature_string(), func_volatile(), get_func_rettype(), LookupFuncName(), NameListToString(), NIL, OidIsValid, and WARNING.
Referenced by DefineType().
Definition at line 2079 of file typecmds.c.
References ereport, errcode(), errmsg(), ERROR, fb(), func_signature_string(), func_volatile(), get_func_rettype(), LookupFuncName(), NameListToString(), NIL, OidIsValid, and WARNING.
Referenced by DefineType().
Definition at line 2114 of file typecmds.c.
References ereport, errcode(), errmsg(), ERROR, fb(), format_type_be(), func_signature_string(), func_volatile(), get_func_rettype(), LookupFuncName(), NameListToString(), NIL, OidIsValid, and WARNING.
Referenced by AlterType(), and DefineType().
Definition at line 2168 of file typecmds.c.
References ereport, errcode(), errmsg(), ERROR, fb(), func_signature_string(), func_volatile(), get_func_rettype(), LookupFuncName(), NameListToString(), NIL, OidIsValid, and WARNING.
Referenced by AlterType(), and DefineType().
Definition at line 2298 of file typecmds.c.
References ereport, errcode(), errmsg(), ERROR, fb(), func_signature_string(), get_func_rettype(), LookupFuncName(), NameListToString(), NIL, and OidIsValid.
Referenced by AlterType(), and DefineType().
Definition at line 2203 of file typecmds.c.
References ereport, errcode(), errmsg(), ERROR, fb(), func_signature_string(), func_volatile(), get_func_rettype(), LookupFuncName(), NameListToString(), NIL, OidIsValid, and WARNING.
Referenced by AlterType(), and DefineType().
Definition at line 2237 of file typecmds.c.
References ereport, errcode(), errmsg(), ERROR, fb(), func_signature_string(), func_volatile(), get_func_rettype(), LookupFuncName(), NameListToString(), NIL, OidIsValid, and WARNING.
Referenced by AlterType(), and DefineType().
Definition at line 3352 of file typecmds.c.
References AccessShareLock, Assert, BTEqualStrategyNumber, check_stack_depth(), fb(), find_composite_type_dependencies(), format_type_be(), get_rels_with_domain(), get_typtype(), GETSTRUCT(), HeapTupleIsValid, lappend(), lfirst, list_concat(), NIL, NoLock, ObjectIdGetDatum(), OidIsValid, palloc_array, palloc_object, RelationData::rd_rel, relation_close(), relation_open(), RelationGetNumberOfAttributes, RelationGetRelid, ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_open(), and TupleDescAttr().
Referenced by get_rels_with_domain(), validateDomainCheckConstraint(), and validateDomainNotNullConstraint().
|
static |
Definition at line 1869 of file typecmds.c.
References buildoidvector(), CharGetDatum(), construct_array_builtin(), DEPENDENCY_INTERNAL, fb(), FUNC_PARAM_VARIADIC, InvalidOid, name, NIL, ObjectIdGetDatum(), pfree(), PointerGetDatum(), ProcedureCreate(), and recordDependencyOn().
Referenced by DefineRange().
|
static |
Definition at line 1788 of file typecmds.c.
References buildoidvector(), ObjectAddress::classId, DEPENDENCY_INTERNAL, fb(), i, InvalidOid, lengthof, name, NIL, PointerGetDatum(), ProcedureCreate(), pronargs, and recordDependencyOn().
Referenced by DefineRange().
Definition at line 659 of file typecmds.c.
References CatalogTupleDelete(), elog, EnumValuesDelete(), ERROR, fb(), GETSTRUCT(), HeapTupleIsValid, ObjectIdGetDatum(), RangeDelete(), ReleaseSysCache(), RowExclusiveLock, SearchSysCache1(), table_close(), and table_open().
Referenced by doDeletion().
| ObjectAddress RenameType | ( | RenameStmt * | stmt | ) |
Definition at line 3776 of file typecmds.c.
References aclcheck_error_type(), ACLCHECK_NOT_OWNER, castNode, elog, ereport, errcode(), errhint(), errmsg(), ERROR, fb(), format_type_be(), get_rel_relkind(), GETSTRUCT(), GetUserId(), HeapTupleIsValid, makeTypeNameFromNameList(), OBJECT_DOMAIN, object_ownercheck(), ObjectAddressSet, ObjectIdGetDatum(), RenameRelationInternal(), RenameTypeInternal(), RowExclusiveLock, SearchSysCacheCopy1, stmt, table_close(), table_open(), and typenameTypeId().
Referenced by ExecRenameStmt().
|
static |
Definition at line 3670 of file typecmds.c.
References copyObject, fb(), linitial, list_length(), ParseState::p_ref_hook_state, and strVal.
Referenced by domainAddCheckConstraint().
|
static |
Definition at line 3233 of file typecmds.c.
References attnum, CreateExecutorState(), DatumGetBool(), ExprContext::domainValue_datum, ExprContext::domainValue_isNull, ereport, errcode(), errmsg(), ERROR, errtablecol(), ExecDropSingleTupleTableSlot(), ExecEvalExprSwitchContext(), ExecPrepareExpr(), fb(), ForwardScanDirection, FreeExecutorState(), get_rels_with_domain(), GetLatestSnapshot(), GetPerTupleExprContext, i, lfirst, NameStr, NoLock, RegisterSnapshot(), RelationGetDescr, RelationGetRelationName, ResetExprContext, slot_getattr(), stringToNode(), table_beginscan(), table_close(), table_endscan(), table_scan_getnextslot(), table_slot_create(), TupleDescAttr(), and UnregisterSnapshot().
Referenced by AlterDomainAddConstraint(), and AlterDomainValidateConstraint().
Definition at line 3161 of file typecmds.c.
References attnum, ereport, errcode(), errmsg(), ERROR, errtablecol(), ExecDropSingleTupleTableSlot(), fb(), ForwardScanDirection, get_rels_with_domain(), GetLatestSnapshot(), i, lfirst, NameStr, NoLock, RegisterSnapshot(), RelationGetDescr, RelationGetRelationName, ShareLock, slot_attisnull(), table_beginscan(), table_close(), table_endscan(), table_scan_getnextslot(), table_slot_create(), TupleDescAttr(), and UnregisterSnapshot().
Referenced by AlterDomainAddConstraint(), and AlterDomainNotNull().
| Oid binary_upgrade_next_array_pg_type_oid = InvalidOid |
Definition at line 109 of file typecmds.c.
Referenced by AssignTypeArrayOid(), and binary_upgrade_set_next_array_pg_type_oid().
| Oid binary_upgrade_next_mrng_array_pg_type_oid = InvalidOid |
Definition at line 111 of file typecmds.c.
Referenced by AssignTypeMultirangeArrayOid(), and binary_upgrade_set_next_multirange_array_pg_type_oid().
| Oid binary_upgrade_next_mrng_pg_type_oid = InvalidOid |
Definition at line 110 of file typecmds.c.
Referenced by AssignTypeMultirangeOid(), and binary_upgrade_set_next_multirange_pg_type_oid().