|
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/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 3252 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(), 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 3614 of file extension.c.
References BoolGetDatum(), BTEqualStrategyNumber, CatalogTupleUpdate(), ObjectAddress::classId, CStringGetTextDatum, deleteDependencyRecordsForClass(), DEPENDENCY_NORMAL, elog, ERROR, execute_extension_script(), fb(), 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 400 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 447 of file extension.c.
References ereport, errcode(), errdetail(), errmsg(), ERROR, fb(), and first_dir_separator().
Referenced by CreateExtensionInternal(), and ExecAlterExtensionStmt().
Definition at line 2740 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 2143 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 1833 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 3858 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 3772 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 3467 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(), 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 1245 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 1095 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 383 of file extension.c.
References ext_sibling_list, fb(), ExtensionSiblingCache::next, and ExtensionSiblingCache::valid.
Referenced by get_function_sibling_type().
Definition at line 3087 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 2681 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 1223 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 592 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 4086 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 1778 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 1685 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 2562 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 1518 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 1579 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 637 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 513 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 203 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 250 of file extension.c.
References fb(), GETSTRUCT(), HeapTupleIsValid, NameStr, ObjectIdGetDatum(), pstrdup(), ReleaseSysCache(), and SearchSysCache1().
Referenced by AlterExtensionNamespace(), checkMembershipInCurrentExtension(), ExecAlterExtensionContentsRecurse(), getObjectDescription(), getObjectIdentityParts(), recordDependencyOnCurrentExtension(), and RemoveExtensionById().
Definition at line 228 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 272 of file extension.c.
References fb(), GETSTRUCT(), HeapTupleIsValid, InvalidOid, ObjectIdGetDatum(), ReleaseSysCache(), and SearchSysCache1().
Referenced by ApplyExtensionUpdates(), CreateExtensionInternal(), and ExecAlterExtensionContentsRecurse().
|
static |
Definition at line 618 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 655 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 312 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 1551 of file extension.c.
Referenced by find_update_path().
|
static |
Definition at line 2072 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 1642 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 2241 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 494 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 4063 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 690 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 2485 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 2383 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 2851 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 2766 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 3034 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 897 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 878 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 920 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 3998 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 2329 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 953 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 79 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 80 of file extension.c.
Referenced by checkMembershipInCurrentExtension(), execute_extension_script(), findDependentObjects(), pg_extension_config_dump(), recordDependencyOnCurrentExtension(), and RemoveExtensionById().
|
static |
Definition at line 162 of file extension.c.
Referenced by ext_sibling_callback(), and get_function_sibling_type().
| char* Extension_control_path |
Definition at line 76 of file extension.c.
Referenced by get_extension_control_directories().