|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/htup_details.h"#include "access/table.h"#include "access/xact.h"#include "catalog/binary_upgrade.h"#include "catalog/catalog.h"#include "catalog/dependency.h"#include "catalog/indexing.h"#include "catalog/objectaccess.h"#include "catalog/pg_collation.h"#include "catalog/pg_namespace.h"#include "catalog/pg_proc.h"#include "catalog/pg_type.h"#include "commands/defrem.h"#include "commands/typecmds.h"#include "mb/pg_wchar.h"#include "miscadmin.h"#include "utils/acl.h"#include "utils/builtins.h"#include "utils/fmgroids.h"#include "utils/lsyscache.h"#include "utils/rel.h"#include "utils/syscache.h"
Go to the source code of this file.
Variables | |
| Oid | binary_upgrade_next_pg_type_oid = InvalidOid |
| void GenerateTypeDependencies | ( | HeapTuple | typeTuple, |
| Relation | typeCatalog, | ||
| Node * | defaultExpr, | ||
| void * | typacl, | ||
| char | relationKind, | ||
| bool | isImplicitArray, | ||
| bool | isDependentType, | ||
| bool | makeExtensionDep, | ||
| bool | rebuild | ||
| ) |
Definition at line 555 of file pg_type.c.
References add_exact_object_address(), DatumGetAclPCopy, deleteDependencyRecordsFor(), deleteSharedDependencyRecordsFor(), DEPENDENCY_INTERNAL, DEPENDENCY_NORMAL, fb(), free_object_addresses(), GETSTRUCT(), heap_getattr(), new_object_addresses(), NIL, ObjectAddressSet, OidIsValid, record_object_address_dependencies(), recordDependencyOn(), recordDependencyOnCurrentExtension(), recordDependencyOnExpr(), recordDependencyOnNewAcl(), recordDependencyOnOwner(), RelationGetDescr, stringToNode(), and TextDatumGetCString.
Referenced by AlterDomainDefault(), AlterTypeRecurse(), TypeCreate(), and TypeShellMake().
Definition at line 838 of file pg_type.c.
References CStringGetDatum(), fb(), makeObjectName(), NAMEDATALEN, ObjectIdGetDatum(), pfree(), SearchSysCacheExists2, and snprintf.
Referenced by DefineDomain(), DefineEnum(), DefineRange(), DefineType(), heap_create_with_catalog(), moveArrayTypeName(), and RenameTypeInternal().
Definition at line 948 of file pg_type.c.
References buf, CStringGetDatum(), ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errdetail(), errhint(), errmsg(), ERROR, fb(), NAMEDATALEN, ObjectIdGetDatum(), pg_mbcliplen(), pnstrdup(), psprintf(), pstrdup(), and SearchSysCacheExists2.
Referenced by DefineRange().
Definition at line 903 of file pg_type.c.
References CommandCounterIncrement(), fb(), get_array_type(), get_element_type(), get_typisdefined(), makeArrayTypeName(), OidIsValid, pfree(), and RenameTypeInternal().
Referenced by DefineCompositeType(), DefineDomain(), DefineEnum(), DefineRange(), DefineType(), heap_create_with_catalog(), and RenameTypeInternal().
Definition at line 763 of file pg_type.c.
References Assert, CatalogTupleUpdate(), CStringGetDatum(), elog, ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errmsg(), ERROR, fb(), get_typisdefined(), GETSTRUCT(), GetSysCacheOid2, heap_freetuple(), HeapTupleIsValid, InvokeObjectPostAlterHook, makeArrayTypeName(), moveArrayTypeName(), namestrcpy(), ObjectIdGetDatum(), OidIsValid, pfree(), RenameTypeInternal(), RowExclusiveLock, SearchSysCacheCopy1, HeapTupleData::t_self, table_close(), and table_open().
Referenced by moveArrayTypeName(), RenameRelationInternal(), RenameType(), and RenameTypeInternal().
| 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 | ||
| ) |
Definition at line 195 of file pg_type.c.
References aclcheck_error(), ACLCHECK_NOT_OWNER, binary_upgrade_next_pg_type_oid, BoolGetDatum(), CatalogTupleInsert(), CatalogTupleUpdate(), CharGetDatum(), CStringGetDatum(), CStringGetTextDatum, elog, ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errmsg(), ERROR, fb(), GenerateTypeDependencies(), get_user_default_acl(), GetNewOidWithIndex(), GETSTRUCT(), heap_form_tuple(), heap_modify_tuple(), HeapTupleIsValid, i, Int16GetDatum(), Int32GetDatum(), InvalidOid, InvokeObjectPostCreateHook, IsBinaryUpgrade, IsBootstrapProcessingMode, name, NameGetDatum(), namestrcpy(), OBJECT_TYPE, ObjectAddressSet, ObjectIdGetDatum(), OidIsValid, PointerGetDatum(), RelationGetDescr, RowExclusiveLock, SearchSysCacheCopy2, storage, stringToNode(), table_close(), table_open(), and values.
Referenced by AddNewRelationType(), DefineDomain(), DefineEnum(), DefineRange(), DefineType(), and heap_create_with_catalog().
| ObjectAddress TypeShellMake | ( | const char * | typeName, |
| Oid | typeNamespace, | ||
| Oid | ownerId | ||
| ) |
Definition at line 57 of file pg_type.c.
References Assert, binary_upgrade_next_pg_type_oid, BoolGetDatum(), CatalogTupleInsert(), CharGetDatum(), DEFAULT_TYPDELIM, ereport, errcode(), errmsg(), ERROR, fb(), GenerateTypeDependencies(), GetNewOidWithIndex(), heap_form_tuple(), heap_freetuple(), i, Int16GetDatum(), Int32GetDatum(), InvalidOid, InvokeObjectPostCreateHook, IsBinaryUpgrade, IsBootstrapProcessingMode, name, NameGetDatum(), namestrcpy(), ObjectAddressSet, ObjectIdGetDatum(), OidIsValid, RowExclusiveLock, table_close(), table_open(), and values.
Referenced by compute_return_type(), and DefineType().
| Oid binary_upgrade_next_pg_type_oid = InvalidOid |
Definition at line 41 of file pg_type.c.
Referenced by binary_upgrade_set_next_pg_type_oid(), TypeCreate(), and TypeShellMake().