PostgreSQL Source Code
git master
|
Go to the source code of this file.
Functions | |
ObjectAddress | CreateExtension (ParseState *pstate, CreateExtensionStmt *stmt) |
void | RemoveExtensionById (Oid extId) |
ObjectAddress | InsertExtensionTuple (const char *extName, Oid extOwner, Oid schemaOid, bool relocatable, const char *extVersion, Datum extConfig, Datum extCondition, List *requiredExtensions) |
ObjectAddress | ExecAlterExtensionStmt (ParseState *pstate, AlterExtensionStmt *stmt) |
ObjectAddress | ExecAlterExtensionContentsStmt (AlterExtensionContentsStmt *stmt, ObjectAddress *objAddr) |
Oid | get_extension_oid (const char *extname, bool missing_ok) |
char * | get_extension_name (Oid ext_oid) |
Oid | get_extension_schema (Oid ext_oid) |
bool | extension_file_exists (const char *extensionName) |
ObjectAddress | AlterExtensionNamespace (const char *extensionName, const char *newschema, Oid *oldschema) |
Variables | |
PGDLLIMPORT bool | creating_extension |
PGDLLIMPORT Oid | CurrentExtensionObject |
ObjectAddress AlterExtensionNamespace | ( | const char * | extensionName, |
const char * | newschema, | ||
Oid * | oldschema | ||
) |
Definition at line 2716 of file extension.c.
References AccessShareLock, ACL_CREATE, aclcheck_error(), ACLCHECK_NOT_OWNER, ACLCHECK_OK, AlterObjectNamespace_oid(), BTEqualStrategyNumber, CatalogTupleUpdate(), changeDependencyFor(), ObjectAddress::classId, DEPENDENCY_EXTENSION, DEPENDENCY_NORMAL, elog, ereport, errcode(), errdetail(), errmsg(), ERROR, get_extension_name(), get_extension_oid(), get_namespace_name(), getExtensionOfObject(), getObjectDescription(), GETSTRUCT, GetUserId(), heap_copytuple(), HeapTupleIsValid, InvalidObjectAddress, InvalidOid, InvokeObjectPostAlterHook, sort-test::key, lfirst, LookupCreationNamespace(), NameStr, new_object_addresses(), ExtensionControlFile::no_relocate, object_aclcheck(), OBJECT_EXTENSION, object_ownercheck(), OBJECT_SCHEMA, ObjectAddressSet, ObjectAddress::objectId, ObjectIdGetDatum(), ObjectAddress::objectSubId, read_extension_control_file(), relation_close(), RowExclusiveLock, ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), HeapTupleData::t_self, table_close(), and table_open().
Referenced by ExecAlterObjectSchemaStmt().
ObjectAddress CreateExtension | ( | ParseState * | pstate, |
CreateExtensionStmt * | stmt | ||
) |
Definition at line 1712 of file extension.c.
References check_valid_extension_name(), CreateExtensionInternal(), creating_extension, defGetBoolean(), defGetString(), DefElem::defname, elog, ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errmsg(), ERROR, errorConflictingDefElem(), get_extension_oid(), InvalidObjectAddress, InvalidOid, lfirst, NIL, NOTICE, and stmt.
Referenced by ProcessUtilitySlow().
ObjectAddress ExecAlterExtensionContentsStmt | ( | AlterExtensionContentsStmt * | stmt, |
ObjectAddress * | objAddr | ||
) |
Definition at line 3236 of file extension.c.
References AccessShareLock, aclcheck_error(), ACLCHECK_NOT_OWNER, Assert, check_object_ownership(), ereport, errcode(), errmsg(), ERROR, ExecAlterExtensionContentsRecurse(), get_object_address(), GetUserId(), InvokeObjectPostAlterHook, makeString(), NoLock, OBJECT_DATABASE, OBJECT_EXTENSION, OBJECT_INDEX, object_ownercheck(), OBJECT_PUBLICATION, OBJECT_ROLE, OBJECT_STATISTIC_EXT, OBJECT_SUBSCRIPTION, OBJECT_TABLESPACE, ObjectAddress::objectId, relation_close(), ShareUpdateExclusiveLock, and stmt.
Referenced by ProcessUtilitySlow().
ObjectAddress ExecAlterExtensionStmt | ( | ParseState * | pstate, |
AlterExtensionStmt * | stmt | ||
) |
Definition at line 2931 of file extension.c.
References AccessShareLock, aclcheck_error(), ACLCHECK_NOT_OWNER, ApplyExtensionUpdates(), DefElem::arg, BTEqualStrategyNumber, check_valid_version_name(), creating_extension, CStringGetDatum(), DatumGetTextPP, ExtensionControlFile::default_version, DefElem::defname, elog, ereport, errcode(), errmsg(), ERROR, errorConflictingDefElem(), GETSTRUCT, GetUserId(), heap_getattr(), HeapTupleIsValid, identify_update_path(), InvalidObjectAddress, sort-test::key, lfirst, NOTICE, OBJECT_EXTENSION, object_ownercheck(), ObjectAddressSet, read_extension_control_file(), RelationGetDescr, ScanKeyInit(), stmt, strVal, systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), table_open(), and text_to_cstring().
Referenced by ProcessUtilitySlow().
bool extension_file_exists | ( | const char * | extensionName | ) |
Definition at line 2204 of file extension.c.
References AllocateDir(), dirent::d_name, FreeDir(), get_extension_control_directory(), is_extension_control_filename(), pstrdup(), and ReadDir().
Referenced by CreateFunction(), and ExecuteDoStmt().
char* get_extension_name | ( | Oid | ext_oid | ) |
Definition at line 168 of file extension.c.
References GETSTRUCT, HeapTupleIsValid, NameStr, ObjectIdGetDatum(), pstrdup(), ReleaseSysCache(), and SearchSysCache1().
Referenced by AlterExtensionNamespace(), checkMembershipInCurrentExtension(), ExecAlterExtensionContentsRecurse(), getObjectDescription(), getObjectIdentityParts(), recordDependencyOnCurrentExtension(), and RemoveExtensionById().
Definition at line 146 of file extension.c.
References CStringGetDatum(), ereport, errcode(), errmsg(), ERROR, GetSysCacheOid1, and OidIsValid.
Referenced by AlterExtensionNamespace(), binary_upgrade_create_empty_extension(), CreateExtension(), ExtractExtensionList(), get_object_address_unqualified(), and get_required_extension().
Definition at line 190 of file extension.c.
References GETSTRUCT, HeapTupleIsValid, InvalidOid, ObjectIdGetDatum(), ReleaseSysCache(), and SearchSysCache1().
Referenced by ApplyExtensionUpdates(), CreateExtensionInternal(), and ExecAlterExtensionContentsRecurse().
ObjectAddress InsertExtensionTuple | ( | const char * | extName, |
Oid | extOwner, | ||
Oid | schemaOid, | ||
bool | relocatable, | ||
const char * | extVersion, | ||
Datum | extConfig, | ||
Datum | extCondition, | ||
List * | requiredExtensions | ||
) |
Definition at line 1810 of file extension.c.
References add_exact_object_address(), BoolGetDatum(), CatalogTupleInsert(), CStringGetDatum(), CStringGetTextDatum, DEPENDENCY_NORMAL, DirectFunctionCall1, free_object_addresses(), GetNewOidWithIndex(), heap_form_tuple(), heap_freetuple(), InvokeObjectPostCreateHook, lfirst_oid, namein(), new_object_addresses(), ObjectAddressSet, ObjectIdGetDatum(), PointerGetDatum(), RelationData::rd_att, record_object_address_dependencies(), recordDependencyOnOwner(), RowExclusiveLock, table_close(), table_open(), and values.
Referenced by binary_upgrade_create_empty_extension(), and CreateExtensionInternal().
void RemoveExtensionById | ( | Oid | extId | ) |
Definition at line 1898 of file extension.c.
References BTEqualStrategyNumber, CatalogTupleDelete(), CurrentExtensionObject, ereport, errcode(), errmsg(), ERROR, get_extension_name(), HeapTupleIsValid, ObjectIdGetDatum(), RowExclusiveLock, ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), HeapTupleData::t_self, table_close(), and table_open().
Referenced by doDeletion().
|
extern |
Definition at line 72 of file extension.c.
Referenced by checkMembershipInCurrentExtension(), CreateExtension(), EventTriggerAlterTableStart(), EventTriggerCollectAlterDefPrivs(), EventTriggerCollectAlterOpFam(), EventTriggerCollectAlterTSConfig(), EventTriggerCollectCreateOpClass(), EventTriggerCollectGrant(), EventTriggerCollectSimpleCommand(), ExecAlterExtensionStmt(), execute_extension_script(), findDependentObjects(), pg_extension_config_dump(), recordDependencyOnCurrentExtension(), and recordExtensionInitPriv().
|
extern |
Definition at line 73 of file extension.c.
Referenced by checkMembershipInCurrentExtension(), execute_extension_script(), findDependentObjects(), pg_extension_config_dump(), recordDependencyOnCurrentExtension(), and RemoveExtensionById().