|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <dirent.h>#include <limits.h>#include <sys/file.h>#include <sys/stat.h>#include <unistd.h>#include "access/genam.h"#include "access/htup_details.h"#include "access/relation.h"#include "access/table.h"#include "access/xact.h"#include "catalog/catalog.h"#include "catalog/dependency.h"#include "catalog/indexing.h"#include "catalog/namespace.h"#include "catalog/objectaccess.h"#include "catalog/pg_authid.h"#include "catalog/pg_collation.h"#include "catalog/pg_database.h"#include "catalog/pg_depend.h"#include "catalog/pg_extension.h"#include "catalog/pg_namespace.h"#include "catalog/pg_proc.h"#include "catalog/pg_type.h"#include "commands/alter.h"#include "commands/comment.h"#include "commands/defrem.h"#include "commands/extension.h"#include "commands/schemacmds.h"#include "funcapi.h"#include "mb/pg_wchar.h"#include "miscadmin.h"#include "nodes/pg_list.h"#include "nodes/queryjumble.h"#include "storage/fd.h"#include "tcop/utility.h"#include "utils/acl.h"#include "utils/builtins.h"#include "utils/conffiles.h"#include "utils/fmgroids.h"#include "utils/inval.h"#include "utils/lsyscache.h"#include "utils/memutils.h"#include "utils/rel.h"#include "utils/snapmgr.h"#include "utils/syscache.h"#include "utils/tuplestore.h"#include "utils/varlena.h"
Go to the source code of this file.
Data Structures | |
| struct | ExtensionControlFile |
| struct | ExtensionVersionInfo |
| struct | script_error_callback_arg |
| struct | ExtensionLocation |
| struct | ExtensionSiblingCache |
Typedefs | |
| typedef struct ExtensionControlFile | ExtensionControlFile |
| typedef struct ExtensionVersionInfo | ExtensionVersionInfo |
| typedef struct ExtensionSiblingCache | ExtensionSiblingCache |
Variables | |
| char * | Extension_control_path |
| bool | creating_extension = false |
| Oid | CurrentExtensionObject = InvalidOid |
| static ExtensionSiblingCache * | ext_sibling_list = NULL |
| ObjectAddress AlterExtensionNamespace | ( | const char * | extensionName, |
| const char * | newschema, | ||
| Oid * | oldschema | ||
| ) |
Definition at line 3253 of file extension.c.
References AccessShareLock, ACL_CREATE, aclcheck_error(), ACLCHECK_NOT_OWNER, ACLCHECK_OK, AlterObjectNamespace_oid(), BTEqualStrategyNumber, CatalogTupleUpdate(), changeDependencyFor(), DEPENDENCY_EXTENSION, DEPENDENCY_NORMAL, elog, ereport, errcode(), errdetail(), errmsg, ERROR, fb(), Form_pg_depend, Form_pg_extension, get_extension_name(), get_extension_oid(), get_namespace_name(), getExtensionOfObject(), getObjectDescription(), GETSTRUCT(), GetUserId(), heap_copytuple(), HeapTupleIsValid, InvalidObjectAddress, InvalidOid, InvokeObjectPostAlterHook, lfirst, LookupCreationNamespace(), NameStr, new_object_addresses(), object_aclcheck(), OBJECT_EXTENSION, object_ownercheck(), OBJECT_SCHEMA, ObjectAddressSet, ObjectIdGetDatum(), read_extension_control_file(), relation_close(), RowExclusiveLock, ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by ExecAlterObjectSchemaStmt().
|
static |
Definition at line 3615 of file extension.c.
References BoolGetDatum(), BTEqualStrategyNumber, CatalogTupleUpdate(), ObjectAddress::classId, CStringGetTextDatum, deleteDependencyRecordsForClass(), DEPENDENCY_NORMAL, elog, ERROR, execute_extension_script(), fb(), Form_pg_extension, get_extension_schema(), get_namespace_name(), get_required_extension(), GETSTRUCT(), heap_modify_tuple(), HeapTupleIsValid, InvokeObjectPostAlterHook, lappend_oid(), lfirst, lfirst_oid, ExtensionControlFile::name, NIL, ObjectIdGetDatum(), read_extension_aux_control_file(), recordDependencyOn(), RelationGetDescr, ExtensionControlFile::relocatable, RowExclusiveLock, ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), table_open(), and values.
Referenced by CreateExtensionInternal(), and ExecAlterExtensionStmt().
Definition at line 401 of file extension.c.
References ereport, errcode(), errdetail(), errmsg, ERROR, fb(), and first_dir_separator().
Referenced by CreateExtension(), get_required_extension(), and pg_extension_update_paths().
Definition at line 448 of file extension.c.
References ereport, errcode(), errdetail(), errmsg, ERROR, fb(), and first_dir_separator().
Referenced by CreateExtensionInternal(), and ExecAlterExtensionStmt().
Definition at line 2741 of file extension.c.
References a, construct_array_builtin(), CStringGetDatum(), DirectFunctionCall1, fb(), lfirst, list_length(), namein(), palloc(), and PointerGetDatum().
Referenced by get_available_versions_for_extension().
| ObjectAddress CreateExtension | ( | ParseState * | pstate, |
| CreateExtensionStmt * | stmt | ||
| ) |
Definition at line 2144 of file extension.c.
References check_valid_extension_name(), CreateExtensionInternal(), creating_extension, defGetBoolean(), defGetString(), elog, ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errmsg, ERROR, errorConflictingDefElem(), fb(), get_extension_oid(), InvalidObjectAddress, InvalidOid, lfirst, NIL, NOTICE, and stmt.
Referenced by ProcessUtilitySlow().
|
static |
Definition at line 1834 of file extension.c.
References ApplyExtensionUpdates(), check_valid_version_name(), ExtensionControlFile::comment, CreateComments(), CreateSchemaCommand(), ereport, errcode(), errmsg, ERROR, execute_extension_script(), fb(), fetch_search_path(), filename, find_install_path(), get_ext_ver_info(), get_ext_ver_list(), get_extension_schema(), get_extension_script_filename(), get_namespace_name(), get_namespace_oid(), get_required_extension(), GetUserId(), InsertExtensionTuple(), InvalidOid, isTempNamespace(), lappend_oid(), lfirst, linitial_oid, list_free(), makeNode, MyXactFlags, ExtensionControlFile::name, NIL, ObjectAddress::objectId, OidIsValid, PointerGetDatum(), read_extension_aux_control_file(), read_extension_control_file(), ExtensionControlFile::relocatable, ExtensionControlFile::schema, stat, and XACT_FLAGS_ACCESSEDTEMPNAMESPACE.
Referenced by CreateExtension(), and get_required_extension().
|
static |
Definition at line 3859 of file extension.c.
References ObjectAddress::classId, deleteDependencyRecordsForClass(), DEPENDENCY_EXTENSION, elog, ereport, errcode(), errmsg, ERROR, ExecAlterExtensionContentsRecurse(), extension_config_remove(), fb(), format_type_be(), get_array_type(), get_extension_name(), get_extension_schema(), get_namespace_name(), get_range_multirange(), get_rel_type_id(), getExtensionOfObject(), getObjectDescription(), OidIsValid, recordDependencyOn(), recordExtObjInitPriv(), removeExtObjInitPriv(), stmt, and type_is_range().
Referenced by ExecAlterExtensionContentsRecurse(), and ExecAlterExtensionContentsStmt().
| ObjectAddress ExecAlterExtensionContentsStmt | ( | AlterExtensionContentsStmt * | stmt, |
| ObjectAddress * | objAddr | ||
| ) |
Definition at line 3773 of file extension.c.
References AccessShareLock, aclcheck_error(), ACLCHECK_NOT_OWNER, Assert, check_object_ownership(), ereport, errcode(), errmsg, ERROR, ExecAlterExtensionContentsRecurse(), fb(), 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, relation_close(), ShareUpdateExclusiveLock, and stmt.
Referenced by ProcessUtilitySlow().
| ObjectAddress ExecAlterExtensionStmt | ( | ParseState * | pstate, |
| AlterExtensionStmt * | stmt | ||
| ) |
Definition at line 3468 of file extension.c.
References AccessShareLock, aclcheck_error(), ACLCHECK_NOT_OWNER, ApplyExtensionUpdates(), BTEqualStrategyNumber, check_valid_version_name(), creating_extension, CStringGetDatum(), DatumGetTextPP, ExtensionControlFile::default_version, elog, ereport, errcode(), errmsg, ERROR, errorConflictingDefElem(), fb(), Form_pg_extension, GETSTRUCT(), GetUserId(), heap_getattr(), HeapTupleIsValid, identify_update_path(), InvalidObjectAddress, 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().
|
static |
Definition at line 1246 of file extension.c.
References appendStringInfo(), appendStringInfoString(), Assert, AtEOXact_GUC(), check_function_bodies, client_min_messages, creating_extension, CStringGetTextDatum, CurrentExtensionObject, DatumGetTextPP, DEBUG1, DirectFunctionCall3Coll(), DirectFunctionCall4Coll(), elog, ereport, errcode(), errhint(), errmsg, ERROR, execute_sql_string(), extension_is_trusted(), fb(), filename, forboth, get_extension_script_filename(), get_namespace_name(), GetUserId(), GetUserIdAndSecContext(), GetUserNameFromId(), GUC_ACTION_SAVE, initStringInfo(), InvalidOid, lfirst, lfirst_oid, list_length(), log_min_messages, ExtensionControlFile::module_pathname, MyBackendType, ExtensionControlFile::name, NewGUCNestLevel(), PG_END_TRY, PG_FINALLY, PG_TRY, PGC_S_SESSION, PGC_SUSET, PGC_USERSET, psprintf(), quote_identifier(), read_extension_script_file(), ExtensionControlFile::relocatable, replace_text(), SECURITY_LOCAL_USERID_CHANGE, set_config_option(), set_config_option_ext(), SetUserIdAndSecContext(), ExtensionControlFile::superuser, superuser(), text_to_cstring(), textregexreplace(), ExtensionControlFile::trusted, and WARNING.
Referenced by ApplyExtensionUpdates(), and CreateExtensionInternal().
Definition at line 1096 of file extension.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, CommandCounterIncrement(), CreateDestReceiver(), CreateQueryDesc(), CurrentMemoryContext, CURSOR_OPT_PARALLEL_OK, DestNone, ereport, errcode(), errmsg, ERROR, error_context_stack, ExecutorEnd(), ExecutorFinish(), ExecutorRun(), ExecutorStart(), fb(), script_error_callback_arg::filename, filename, ForwardScanDirection, FreeQueryDesc(), GetActiveSnapshot(), GetTransactionSnapshot(), IsA, lfirst_node, MemoryContextDelete(), MemoryContextSwitchTo(), pg_analyze_and_rewrite_fixedparams(), pg_parse_query(), pg_plan_queries(), PopActiveSnapshot(), ErrorContextCallback::previous, PROCESS_UTILITY_QUERY, ProcessUtility(), PushActiveSnapshot(), script_error_callback(), script_error_callback_arg::sql, stmt, script_error_callback_arg::stmt_len, RawStmt::stmt_len, script_error_callback_arg::stmt_location, and RawStmt::stmt_location.
Referenced by execute_extension_script().
|
static |
Definition at line 384 of file extension.c.
References ext_sibling_list, fb(), ExtensionSiblingCache::next, and ExtensionSiblingCache::valid.
Referenced by get_function_sibling_type().
Definition at line 3088 of file extension.c.
References a, ARR_DATA_PTR, ARR_DIMS, ARR_ELEMTYPE, ARR_HASNULL, ARR_LBOUND, ARR_NDIM, BTEqualStrategyNumber, CatalogTupleUpdate(), construct_array_builtin(), DatumGetArrayTypeP, deconstruct_array_builtin(), elog, ERROR, fb(), heap_getattr(), heap_modify_tuple(), HeapTupleIsValid, i, ObjectIdGetDatum(), PointerGetDatum(), RelationGetDescr, RowExclusiveLock, ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by ExecAlterExtensionContentsRecurse().
Definition at line 2682 of file extension.c.
References AllocateDir(), fb(), foreach_ptr, FreeDir(), get_extension_control_directories(), is_extension_control_filename(), pstrdup(), and ReadDir().
Referenced by CreateFunction(), and ExecuteDoStmt().
|
static |
Definition at line 1224 of file extension.c.
References ACL_CREATE, ACLCHECK_OK, fb(), GetUserId(), MyDatabaseId, object_aclcheck(), and ExtensionControlFile::trusted.
Referenced by execute_extension_script().
|
static |
Definition at line 593 of file extension.c.
References Assert, ExtensionControlFile::control_dir, fb(), find_in_paths(), get_extension_control_directories(), ExtensionControlFile::name, pnstrdup(), and psprintf().
Referenced by parse_extension_control_file().
Definition at line 4087 of file extension.c.
References Assert, canonicalize_path(), ereport, errcode(), errmsg, ERROR, fb(), is_absolute_path, lfirst, ExtensionLocation::loc, pfree(), pg_file_exists(), psprintf(), and pstrdup().
Referenced by find_extension_control_filename().
|
static |
Definition at line 1779 of file extension.c.
References fb(), find_update_path(), lfirst, list_length(), and NIL.
Referenced by CreateExtensionInternal(), and get_available_versions_for_extension().
|
static |
Definition at line 1686 of file extension.c.
References Assert, ExtensionVersionInfo::distance, fb(), get_nearest_unprocessed_vertex(), lcons(), lfirst, and NIL.
Referenced by find_install_path(), identify_update_path(), and pg_extension_update_paths().
|
static |
Definition at line 2563 of file extension.c.
References BoolGetDatum(), ExtensionControlFile::comment, convert_requires_to_datum(), CStringGetDatum(), CStringGetTextDatum, DirectFunctionCall1, fb(), find_install_path(), get_ext_ver_list(), get_extension_location(), lfirst, ExtensionControlFile::name, namein(), NIL, read_extension_aux_control_file(), ExtensionControlFile::relocatable, ExtensionControlFile::schema, ExtensionControlFile::superuser, ExtensionControlFile::trusted, tuplestore_putvalues(), and values.
Referenced by pg_available_extension_versions().
|
static |
Definition at line 1519 of file extension.c.
References fb(), lappend(), lfirst, NIL, palloc_object, and pstrdup().
Referenced by CreateExtensionInternal(), get_ext_ver_list(), and identify_update_path().
|
static |
Definition at line 1580 of file extension.c.
References AllocateDir(), fb(), FreeDir(), get_ext_ver_info(), get_extension_script_directory(), is_extension_script_filename(), lappend(), ExtensionControlFile::name, NIL, pstrdup(), and ReadDir().
Referenced by CreateExtensionInternal(), get_available_versions_for_extension(), identify_update_path(), and pg_extension_update_paths().
|
static |
Definition at line 638 of file extension.c.
References fb(), get_extension_script_directory(), MAXPGPATH, ExtensionControlFile::name, palloc(), pfree(), and snprintf.
Referenced by parse_extension_control_file().
Definition at line 514 of file extension.c.
References canonicalize_path(), Extension_control_path, fb(), first_path_var_separator(), get_share_path(), lappend(), len, ExtensionLocation::loc, ExtensionLocation::macro, MAXPGPATH, my_exec_path, NIL, palloc(), palloc_object, pfree(), psprintf(), pstrdup(), strlcpy(), and substitute_path_macro().
Referenced by extension_file_exists(), find_extension_control_filename(), pg_available_extension_versions(), and pg_available_extensions().
|
static |
Definition at line 204 of file extension.c.
References fb(), ExtensionLocation::loc, ExtensionLocation::macro, and superuser().
Referenced by get_available_versions_for_extension(), and pg_available_extensions().
Definition at line 251 of file extension.c.
References fb(), Form_pg_extension, GETSTRUCT(), HeapTupleIsValid, NameStr, ObjectIdGetDatum(), pstrdup(), ReleaseSysCache(), and SearchSysCache1().
Referenced by AlterExtensionNamespace(), checkMembershipInCurrentExtension(), ExecAlterExtensionContentsRecurse(), getObjectDescription(), getObjectIdentityParts(), recordDependencyOnCurrentExtension(), and RemoveExtensionById().
Definition at line 229 of file extension.c.
References CStringGetDatum(), ereport, errcode(), errmsg, ERROR, fb(), GetSysCacheOid1, and OidIsValid.
Referenced by AlterExtensionNamespace(), binary_upgrade_create_empty_extension(), CreateExtension(), ExtractExtensionList(), get_object_address_unqualified(), and get_required_extension().
Definition at line 273 of file extension.c.
References fb(), Form_pg_extension, GETSTRUCT(), HeapTupleIsValid, InvalidOid, ObjectIdGetDatum(), ReleaseSysCache(), and SearchSysCache1().
Referenced by ApplyExtensionUpdates(), CreateExtensionInternal(), and ExecAlterExtensionContentsRecurse().
|
static |
Definition at line 619 of file extension.c.
References Assert, ExtensionControlFile::basedir, ExtensionControlFile::control_dir, ExtensionControlFile::directory, fb(), is_absolute_path, psprintf(), and pstrdup().
Referenced by get_ext_ver_list(), get_extension_aux_control_filename(), and get_extension_script_filename().
|
static |
Definition at line 656 of file extension.c.
References fb(), get_extension_script_directory(), MAXPGPATH, ExtensionControlFile::name, palloc(), pfree(), and snprintf.
Referenced by CreateExtensionInternal(), and execute_extension_script().
Definition at line 313 of file extension.c.
References CacheMemoryContext, CacheRegisterSyscacheCallback(), ext_sibling_callback(), ext_sibling_list, fb(), getExtensionOfObject(), getExtensionType(), GetSysCacheHashValue1, InvalidOid, MemoryContextAllocZero(), ExtensionSiblingCache::next, ObjectIdGetDatum(), OidIsValid, ExtensionSiblingCache::reqfuncoid, ExtensionSiblingCache::typeoid, and typname.
Referenced by _int_matchsel().
|
static |
Definition at line 1552 of file extension.c.
Referenced by find_update_path().
|
static |
Definition at line 2073 of file extension.c.
References check_valid_extension_name(), CreateExtensionInternal(), ereport, errcode(), errhint(), errmsg, ERROR, fb(), get_extension_oid(), lappend(), lfirst, list_copy(), NOTICE, ObjectAddress::objectId, and OidIsValid.
Referenced by ApplyExtensionUpdates(), and CreateExtensionInternal().
|
static |
Definition at line 1643 of file extension.c.
References ereport, errcode(), errmsg, ERROR, fb(), find_update_path(), get_ext_ver_info(), get_ext_ver_list(), ExtensionControlFile::name, and NIL.
Referenced by ExecAlterExtensionStmt().
| ObjectAddress InsertExtensionTuple | ( | const char * | extName, |
| Oid | extOwner, | ||
| Oid | schemaOid, | ||
| bool | relocatable, | ||
| const char * | extVersion, | ||
| Datum | extConfig, | ||
| Datum | extCondition, | ||
| List * | requiredExtensions | ||
| ) |
Definition at line 2242 of file extension.c.
References add_exact_object_address(), BoolGetDatum(), CatalogTupleInsert(), CStringGetDatum(), CStringGetTextDatum, DEPENDENCY_NORMAL, DirectFunctionCall1, fb(), 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().
Definition at line 495 of file extension.c.
References fb(), and filename.
Referenced by extension_file_exists(), pg_available_extension_versions(), and pg_available_extensions().
|
static |
Definition at line 4064 of file extension.c.
References ExtensionControlFile::encoding, ExtensionControlFile::name, palloc0_object, pstrdup(), ExtensionControlFile::relocatable, ExtensionControlFile::superuser, and ExtensionControlFile::trusted.
Referenced by pg_available_extension_versions(), pg_available_extensions(), and read_extension_control_file().
|
static |
Definition at line 691 of file extension.c.
References AllocateFile(), Assert, ExtensionControlFile::basedir, ExtensionControlFile::comment, CONF_FILE_START_DEPTH, ExtensionControlFile::control_dir, ExtensionControlFile::default_version, ExtensionControlFile::directory, ExtensionControlFile::encoding, ereport, errcode(), errcode_for_file_access(), errhint(), errmsg, ERROR, fb(), filename, find_extension_control_filename(), FreeConfigVariables(), FreeFile(), get_extension_aux_control_filename(), ExtensionControlFile::module_pathname, ExtensionControlFile::name, ConfigVariable::name, ConfigVariable::next, ExtensionControlFile::no_relocate, parse_bool(), ParseConfigFp(), pfree(), pg_valid_server_encoding, pnstrdup(), psprintf(), pstrdup(), ExtensionControlFile::relocatable, ExtensionControlFile::schema, SplitIdentifierString(), ExtensionControlFile::superuser, ExtensionControlFile::trusted, and ConfigVariable::value.
Referenced by pg_available_extension_versions(), pg_available_extensions(), read_extension_aux_control_file(), and read_extension_control_file().
| Datum pg_available_extension_versions | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2486 of file extension.c.
References AllocateDir(), ExtensionControlFile::control_dir, fb(), foreach_ptr, FreeDir(), get_available_versions_for_extension(), get_extension_control_directories(), InitMaterializedSRF(), is_extension_control_filename(), lappend(), list_member(), makeString(), new_ExtensionControlFile(), NIL, parse_extension_control_file(), pstrdup(), and ReadDir().
| Datum pg_available_extensions | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2384 of file extension.c.
References AllocateDir(), ExtensionControlFile::comment, ExtensionControlFile::control_dir, CStringGetDatum(), CStringGetTextDatum, ExtensionControlFile::default_version, DirectFunctionCall1, fb(), foreach_ptr, FreeDir(), get_extension_control_directories(), get_extension_location(), InitMaterializedSRF(), is_extension_control_filename(), lappend(), list_member(), makeString(), ExtensionControlFile::name, namein(), new_ExtensionControlFile(), NIL, parse_extension_control_file(), pstrdup(), ReadDir(), tuplestore_putvalues(), and values.
| Datum pg_extension_config_dump | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2852 of file extension.c.
References a, ARR_DATA_PTR, ARR_DIMS, ARR_ELEMTYPE, ARR_HASNULL, ARR_LBOUND, ARR_NDIM, array_set(), BTEqualStrategyNumber, CatalogTupleUpdate(), construct_array_builtin(), creating_extension, CurrentExtensionObject, DatumGetArrayTypeP, elog, ereport, errcode(), ERRCODE_UNDEFINED_TABLE, errmsg, ERROR, fb(), get_rel_name(), getExtensionOfObject(), heap_getattr(), heap_modify_tuple(), HeapTupleIsValid, i, ObjectIdGetDatum(), PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_RETURN_VOID, PointerGetDatum(), RelationGetDescr, RowExclusiveLock, ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
| Datum pg_extension_update_paths | ( | PG_FUNCTION_ARGS | ) |
Definition at line 2767 of file extension.c.
References appendStringInfoString(), check_valid_extension_name(), CStringGetTextDatum, fb(), find_update_path(), get_ext_ver_list(), InitMaterializedSRF(), initStringInfo(), lfirst, NameStr, NIL, pfree(), PG_GETARG_NAME, read_extension_control_file(), tuplestore_putvalues(), and values.
| Datum pg_get_loaded_modules | ( | PG_FUNCTION_ARGS | ) |
Definition at line 3035 of file extension.c.
References CStringGetTextDatum, fb(), get_first_loaded_module(), get_loaded_module_details(), get_next_loaded_module(), InitMaterializedSRF(), last_dir_separator(), tuplestore_putvalues(), and values.
|
static |
Definition at line 898 of file extension.c.
References fb(), palloc_object, and parse_extension_control_file().
Referenced by ApplyExtensionUpdates(), CreateExtensionInternal(), and get_available_versions_for_extension().
|
static |
Definition at line 879 of file extension.c.
References fb(), new_ExtensionControlFile(), and parse_extension_control_file().
Referenced by AlterExtensionNamespace(), CreateExtensionInternal(), ExecAlterExtensionStmt(), and pg_extension_update_paths().
|
static |
Definition at line 921 of file extension.c.
References ExtensionControlFile::encoding, fb(), filename, GetDatabaseEncoding(), len, pg_any_to_server(), pg_verify_mbstr(), and read_whole_file().
Referenced by execute_extension_script().
Definition at line 3999 of file extension.c.
References AllocateFile(), buf, ereport, errcode(), errcode_for_file_access(), errmsg, ERROR, fb(), filename, FreeFile(), MaxAllocSize, palloc(), PG_BINARY_R, and stat.
Referenced by read_extension_script_file().
Definition at line 2330 of file extension.c.
References BTEqualStrategyNumber, CatalogTupleDelete(), CurrentExtensionObject, ereport, errcode(), errmsg, ERROR, fb(), get_extension_name(), HeapTupleIsValid, ObjectIdGetDatum(), RowExclusiveLock, ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), HeapTupleData::t_self, table_close(), and table_open().
Referenced by doDeletion().
Definition at line 954 of file extension.c.
References arg, CleanQuerytext(), errcontext, errposition(), fb(), script_error_callback_arg::filename, geterrposition(), internalerrposition(), internalerrquery(), len, pnstrdup(), script_error_callback_arg::sql, script_error_callback_arg::stmt_len, and script_error_callback_arg::stmt_location.
Referenced by execute_sql_string().
Definition at line 80 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().
| Oid CurrentExtensionObject = InvalidOid |
Definition at line 81 of file extension.c.
Referenced by checkMembershipInCurrentExtension(), execute_extension_script(), findDependentObjects(), pg_extension_config_dump(), recordDependencyOnCurrentExtension(), and RemoveExtensionById().
|
static |
Definition at line 163 of file extension.c.
Referenced by ext_sibling_callback(), and get_function_sibling_type().
| char* Extension_control_path |
Definition at line 77 of file extension.c.
Referenced by get_extension_control_directories().