65#include "utils/fmgroids.h"
217 return "<insufficient privilege>";
238 errmsg(
"extension \"%s\" does not exist",
390 if (hashvalue == 0 ||
412 errdetail(
"Extension names must not be empty.")));
421 errdetail(
"Extension names must not contain \"--\".")));
433 errdetail(
"Extension names must not begin or end with \"-\".")));
443 errdetail(
"Extension names must not contain directory separator characters.")));
459 errdetail(
"Version names must not be empty.")));
468 errdetail(
"Version names must not contain \"--\".")));
477 errdetail(
"Version names must not begin or end with \"-\".")));
487 errdetail(
"Version names must not contain directory separator characters.")));
530 paths =
lappend(paths, location);
573 paths =
lappend(paths, location);
721 errmsg(
"extension \"%s\" is not available", control->
name),
722 errhint(
"The extension must first be installed on the system where PostgreSQL is running.")));
744 errmsg(
"could not open extension control file \"%s\": %m",
760 for (item = head; item !=
NULL; item = item->
next)
767 errmsg(
"parameter \"%s\" cannot be set in a secondary extension control file",
772 else if (
strcmp(item->
name,
"default_version") == 0)
777 errmsg(
"parameter \"%s\" cannot be set in a secondary extension control file",
782 else if (
strcmp(item->
name,
"module_pathname") == 0)
794 else if (
strcmp(item->
name,
"relocatable") == 0)
799 errmsg(
"parameter \"%s\" requires a Boolean value",
802 else if (
strcmp(item->
name,
"superuser") == 0)
807 errmsg(
"parameter \"%s\" requires a Boolean value",
815 errmsg(
"parameter \"%s\" requires a Boolean value",
824 errmsg(
"\"%s\" is not a valid encoding name",
838 errmsg(
"parameter \"%s\" must be a list of extension names",
842 else if (
strcmp(item->
name,
"no_relocate") == 0)
853 errmsg(
"parameter \"%s\" must be a list of extension names",
860 errmsg(
"unrecognized parameter \"%s\" in file \"%s\"",
869 errmsg(
"parameter \"schema\" cannot be specified when \"relocatable\" is true")));
956 const char *query = callback_arg->
sql;
999 for (
int loc = 0; loc <
slen; loc++)
1001 if (query[loc] !=
';')
1003 if (query[loc + 1] ==
'\r')
1005 if (query[loc + 1] ==
'\n')
1038 else if (location >= 0)
1067 for (query = callback_arg->
sql; *query; query++)
1074 errcontext(
"extension script file \"%s\", near line %d",
1106 callback_arg.
sql = sql;
1147 "execute_sql_string per-statement context",
1161 foreach(
lc2, stmt_list)
1190 errmsg(
"transaction control statements are not allowed within an extension script")));
1247 const char *version,
1253 Oid save_userid = 0;
1254 int save_sec_context = 0;
1272 errmsg(
"permission denied to create extension \"%s\"",
1275 ?
errhint(
"Must have CREATE privilege on current database to create this extension.")
1276 :
errhint(
"Must be superuser to create this extension.")));
1280 errmsg(
"permission denied to update extension \"%s\"",
1283 ?
errhint(
"Must have CREATE privilege on current database to update this extension.")
1284 :
errhint(
"Must be superuser to update this extension.")));
1290 elog(
DEBUG1,
"executing extension script for \"%s\" version '%s'", control->
name, version);
1292 elog(
DEBUG1,
"executing extension script for \"%s\" update from version '%s' to '%s'", control->
name,
from_version, version);
1417 errmsg(
"invalid character in extension owner: must not contain any of \"%s\"",
1441 errmsg(
"invalid character in extension \"%s\" schema: must not contain any of \"%s\"",
1468 errmsg(
"invalid character in extension \"%s\" schema: must not contain any of \"%s\"",
1533 evi->installable =
false;
1535 evi->distance_known =
false;
1561 if (
evi2->distance_known)
1565 evi->distance >
evi2->distance)
1614 evi->installable =
true;
1663 errmsg(
"extension \"%s\" has no update path from version \"%s\" to version \"%s\"",
1705 evi->distance_known =
false;
1717 evi->distance_known =
true;
1720 foreach(
lc,
evi->reachable)
1799 if (!
evi1->installable)
1871 errmsg(
"version to install must be specified")));
1908 errmsg(
"extension \"%s\" has no installation script nor update path for version \"%s\"",
1942 errmsg(
"extension \"%s\" must be installed in schema \"%s\"",
1959 csstmt->if_not_exists =
false;
1979 if (search_path ==
NIL)
1982 errmsg(
"no schema has been selected to create in")));
1988 errmsg(
"no schema has been selected to create in")));
2015 foreach(
lc, control->requires)
2095 foreach(
lc, parents)
2102 errmsg(
"cyclic dependency detected between extensions \"%s\" and \"%s\"",
2107 (
errmsg(
"installing required extension \"%s\"",
2130 errmsg(
"required extension \"%s\" is not installed",
2133 errhint(
"Use CREATE EXTENSION ... CASCADE to install required extensions too.") : 0));
2150 bool cascade =
false;
2164 if (
stmt->if_not_exists)
2168 errmsg(
"extension \"%s\" already exists, skipping",
2175 errmsg(
"extension \"%s\" already exists",
2186 errmsg(
"nested CREATE EXTENSION is not supported")));
2189 foreach(
lc,
stmt->options)
2200 else if (
strcmp(
defel->defname,
"new_version") == 0)
2262 memset(nulls, 0,
sizeof(nulls));
2350 errmsg(
"cannot drop extension \"%s\" because it is being modified",
2423 *
strrchr(extname,
'.') =
'\0';
2426 if (
strstr(extname,
"--"))
2444 memset(nulls, 0,
sizeof(nulls));
2523 *
strrchr(extname,
'.') =
'\0';
2526 if (
strstr(extname,
"--"))
2582 if (!
evi->installable)
2591 memset(nulls, 0,
sizeof(nulls));
2611 if (control->requires ==
NIL)
2637 if (
evi2->installable)
2657 if (control->requires ==
NIL)
2683 bool result =
false;
2713 *
strrchr(extname,
'.') =
'\0';
2716 if (
strstr(extname,
"--"))
2750 foreach(
lc,
requires)
2807 memset(nulls, 0,
sizeof(nulls));
2877 errmsg(
"%s can only be called from an SQL script executed by CREATE EXTENSION",
2878 "pg_extension_config_dump()")));
2886 if (tablename ==
NULL)
2889 errmsg(
"OID %u does not refer to a table", tableoid)));
2894 errmsg(
"table \"%s\" is not a member of the extension being created",
2919 elog(
ERROR,
"could not find tuple for extension %u",
2953 elog(
ERROR,
"extconfig is not a 1-D Oid array");
2986 elog(
ERROR,
"extconfig and extcondition arrays do not match");
2998 elog(
ERROR,
"extcondition is not a 1-D text array");
3000 elog(
ERROR,
"extconfig and extcondition arrays do not match");
3050 bool nulls[3] = {0};
3116 elog(
ERROR,
"could not find tuple for extension %u",
3142 elog(
ERROR,
"extconfig is not a 1-D Oid array");
3186 dvalues[
i] = dvalues[
i + 1];
3199 elog(
ERROR,
"extconfig and extcondition arrays do not match");
3209 elog(
ERROR,
"extcondition is not a 1-D text array");
3211 elog(
ERROR,
"extconfig and extcondition arrays do not match");
3230 dvalues[
i] = dvalues[
i + 1];
3293 errmsg(
"cannot move extension \"%s\" into schema \"%s\" "
3294 "because the extension contains the schema",
3311 elog(
ERROR,
"could not find tuple for extension %u",
3334 errmsg(
"extension \"%s\" does not support SET SCHEMA",
3391 errmsg(
"cannot SET SCHEMA of extension \"%s\" because other extensions prevent it",
3393 errdetail(
"Extension \"%s\" requests no relocation of extension \"%s\".",
3412 if (
dep.objectSubId != 0)
3413 elog(
ERROR,
"extension should not have a sub-object dependency");
3428 errmsg(
"extension \"%s\" does not support SET SCHEMA",
3430 errdetail(
"%s is not in the extension's schema \"%s\"",
3453 elog(
ERROR,
"could not change schema dependency for extension %s",
3491 errmsg(
"nested ALTER EXTENSION is not supported")));
3511 errmsg(
"extension \"%s\" does not exist",
3544 foreach(
lc,
stmt->options)
3569 errmsg(
"version to install must be specified")));
3580 (
errmsg(
"version \"%s\" of extension \"%s\" is already installed",
3598 NULL,
false,
false);
3663 elog(
ERROR,
"could not find tuple for extension %u",
3678 memset(nulls, 0,
sizeof(nulls));
3679 memset(repl, 0,
sizeof(repl));
3704 foreach(
lc, control->requires)
3779 switch (
stmt->objtype)
3791 errmsg(
"cannot add an object of this type to an extension")));
3824 Assert(
object.objectSubId == 0);
3830 stmt->object, relation);
3844 if (relation !=
NULL)
3869 if (
stmt->action > 0)
3877 errmsg(
"%s is already a member of extension \"%s\"",
3889 errmsg(
"cannot add schema \"%s\" to extension \"%s\" "
3890 "because the schema contains the extension",
3917 errmsg(
"%s is not a member of extension \"%s\"",
3927 elog(
ERROR,
"unexpected number of extension dependency records");
3971 errmsg(
"could not find multirange type for data type %s",
4019 errmsg(
"could not open file \"%s\" for reading: %m",
4048 for (s = d =
buf; *s; s++)
4050 if (!(*s ==
'\r' && s[1] ==
'\n'))
4090 foreach(cell, paths)
4093 char *path = location->
loc;
4105 errmsg(
"component in parameter \"%s\" is not an absolute path",
"extension_control_path"));
void recordExtObjInitPriv(Oid objoid, Oid classoid)
void aclcheck_error(AclResult aclerr, ObjectType objtype, const char *objectname)
AclResult object_aclcheck(Oid classid, Oid objectid, Oid roleid, AclMode mode)
bool object_ownercheck(Oid classid, Oid objectid, Oid roleid)
void removeExtObjInitPriv(Oid objoid, Oid classoid)
Oid AlterObjectNamespace_oid(Oid classId, Oid objid, Oid nspOid, ObjectAddresses *objsMoved)
#define DatumGetArrayTypeP(X)
ArrayType * array_set(ArrayType *array, int nSubscripts, int *indx, Datum dataValue, bool isNull, int arraytyplen, int elmlen, bool elmbyval, char elmalign)
ArrayType * construct_array_builtin(Datum *elems, int nelems, Oid elmtype)
void deconstruct_array_builtin(const ArrayType *array, Oid elmtype, Datum **elemsp, bool **nullsp, int *nelemsp)
bool parse_bool(const char *value, bool *result)
static Datum values[MAXATTR]
#define CStringGetTextDatum(s)
#define Assert(condition)
#define OidIsValid(objectId)
Oid GetNewOidWithIndex(Relation relation, Oid indexId, AttrNumber oidcolumn)
#define CONF_FILE_START_DEPTH
char * defGetString(DefElem *def)
bool defGetBoolean(DefElem *def)
void errorConflictingDefElem(DefElem *defel, ParseState *pstate)
void record_object_address_dependencies(const ObjectAddress *depender, ObjectAddresses *referenced, DependencyType behavior)
void add_exact_object_address(const ObjectAddress *object, ObjectAddresses *addrs)
ObjectAddresses * new_object_addresses(void)
void free_object_addresses(ObjectAddresses *addrs)
DestReceiver * CreateDestReceiver(CommandDest dest)
DynamicFileList * get_next_loaded_module(DynamicFileList *dfptr)
DynamicFileList * get_first_loaded_module(void)
void get_loaded_module_details(DynamicFileList *dfptr, const char **library_path, const char **module_name, const char **module_version)
char * substitute_path_macro(const char *str, const char *macro, const char *value)
int errcode_for_file_access(void)
ErrorContextCallback * error_context_stack
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
int errhint(const char *fmt,...) pg_attribute_printf(1
int internalerrquery(const char *query)
int internalerrposition(int cursorpos)
int errdetail(const char *fmt,...) pg_attribute_printf(1
int errposition(int cursorpos)
#define ereport(elevel,...)
void ExecutorEnd(QueryDesc *queryDesc)
void ExecutorFinish(QueryDesc *queryDesc)
void ExecutorStart(QueryDesc *queryDesc, int eflags)
void ExecutorRun(QueryDesc *queryDesc, ScanDirection direction, uint64 count)
static char * get_extension_aux_control_filename(ExtensionControlFile *control, const char *version)
Oid get_extension_schema(Oid ext_oid)
static bool is_extension_script_filename(const char *filename)
static char * read_whole_file(const char *filename, int *length)
ObjectAddress InsertExtensionTuple(const char *extName, Oid extOwner, Oid schemaOid, bool relocatable, const char *extVersion, Datum extConfig, Datum extCondition, List *requiredExtensions)
static void check_valid_extension_name(const char *extensionname)
Oid get_function_sibling_type(Oid funcoid, const char *typname)
static ExtensionVersionInfo * get_nearest_unprocessed_vertex(List *evi_list)
ObjectAddress CreateExtension(ParseState *pstate, CreateExtensionStmt *stmt)
static void check_valid_version_name(const char *versionname)
static void get_available_versions_for_extension(ExtensionControlFile *pcontrol, Tuplestorestate *tupstore, TupleDesc tupdesc, ExtensionLocation *location)
static bool is_extension_control_filename(const char *filename)
Datum pg_get_loaded_modules(PG_FUNCTION_ARGS)
static ExtensionSiblingCache * ext_sibling_list
static Oid get_required_extension(char *reqExtensionName, char *extensionName, char *origSchemaName, bool cascade, List *parents, bool is_create)
static void script_error_callback(void *arg)
static ExtensionControlFile * read_extension_aux_control_file(const ExtensionControlFile *pcontrol, const char *version)
static char * get_extension_location(ExtensionLocation *loc)
char * Extension_control_path
static void parse_extension_control_file(ExtensionControlFile *control, const char *version)
static List * get_extension_control_directories(void)
Datum pg_available_extension_versions(PG_FUNCTION_ARGS)
static void extension_config_remove(Oid extensionoid, Oid tableoid)
static void execute_sql_string(const char *sql, const char *filename)
static char * get_extension_script_directory(ExtensionControlFile *control)
static void ext_sibling_callback(Datum arg, SysCacheIdentifier cacheid, uint32 hashvalue)
static char * find_extension_control_filename(ExtensionControlFile *control)
ObjectAddress AlterExtensionNamespace(const char *extensionName, const char *newschema, Oid *oldschema)
static ExtensionVersionInfo * find_install_path(List *evi_list, ExtensionVersionInfo *evi_target, List **best_path)
static ExtensionControlFile * read_extension_control_file(const char *extname)
ObjectAddress ExecAlterExtensionStmt(ParseState *pstate, AlterExtensionStmt *stmt)
Oid CurrentExtensionObject
ObjectAddress ExecAlterExtensionContentsStmt(AlterExtensionContentsStmt *stmt, ObjectAddress *objAddr)
Datum pg_extension_update_paths(PG_FUNCTION_ARGS)
static char * read_extension_script_file(const ExtensionControlFile *control, const char *filename)
static void ExecAlterExtensionContentsRecurse(AlterExtensionContentsStmt *stmt, ObjectAddress extension, ObjectAddress object)
Oid get_extension_oid(const char *extname, bool missing_ok)
Datum pg_available_extensions(PG_FUNCTION_ARGS)
static ExtensionControlFile * new_ExtensionControlFile(const char *extname)
Datum pg_extension_config_dump(PG_FUNCTION_ARGS)
char * find_in_paths(const char *basename, List *paths)
static Datum convert_requires_to_datum(List *requires)
static List * identify_update_path(ExtensionControlFile *control, const char *oldVersion, const char *newVersion)
static ExtensionVersionInfo * get_ext_ver_info(const char *versionname, List **evi_list)
char * get_extension_name(Oid ext_oid)
void RemoveExtensionById(Oid extId)
static List * get_ext_ver_list(ExtensionControlFile *control)
static List * find_update_path(List *evi_list, ExtensionVersionInfo *evi_start, ExtensionVersionInfo *evi_target, bool reject_indirect, bool reinitialize)
static char * get_extension_script_filename(ExtensionControlFile *control, const char *from_version, const char *version)
static void execute_extension_script(Oid extensionOid, ExtensionControlFile *control, const char *from_version, const char *version, List *requiredSchemas, const char *schemaName)
bool extension_file_exists(const char *extensionName)
static bool extension_is_trusted(ExtensionControlFile *control)
static void ApplyExtensionUpdates(Oid extensionOid, ExtensionControlFile *pcontrol, const char *initialVersion, List *updateVersions, char *origSchemaName, bool cascade, bool is_create)
static ObjectAddress CreateExtensionInternal(char *extensionName, char *schemaName, const char *versionName, bool cascade, List *parents, bool is_create)
bool pg_file_exists(const char *name)
DIR * AllocateDir(const char *dirname)
struct dirent * ReadDir(DIR *dir, const char *dirname)
FILE * AllocateFile(const char *name, const char *mode)
#define palloc_object(type)
#define palloc0_object(type)
Datum DirectFunctionCall4Coll(PGFunction func, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4)
Datum DirectFunctionCall3Coll(PGFunction func, Oid collation, Datum arg1, Datum arg2, Datum arg3)
#define PG_GETARG_TEXT_PP(n)
#define DatumGetTextPP(X)
#define DirectFunctionCall1(func, arg1)
#define PG_GETARG_NAME(n)
void InitMaterializedSRF(FunctionCallInfo fcinfo, bits32 flags)
void systable_endscan(SysScanDesc sysscan)
HeapTuple systable_getnext(SysScanDesc sysscan)
SysScanDesc systable_beginscan(Relation heapRelation, Oid indexId, bool indexOK, Snapshot snapshot, int nkeys, ScanKey key)
char my_exec_path[MAXPGPATH]
void FreeConfigVariables(ConfigVariable *list)
bool ParseConfigFp(FILE *fp, const char *config_file, int depth, int elevel, ConfigVariable **head_p, ConfigVariable **tail_p)
int set_config_option_ext(const char *name, const char *value, GucContext context, GucSource source, Oid srole, GucAction action, bool changeVal, int elevel, bool is_reload)
int NewGUCNestLevel(void)
void AtEOXact_GUC(bool isCommit, int nestLevel)
int set_config_option(const char *name, const char *value, GucContext context, GucSource source, GucAction action, bool changeVal, int elevel, bool is_reload)
bool check_function_bodies
HeapTuple heap_modify_tuple(HeapTuple tuple, TupleDesc tupleDesc, const Datum *replValues, const bool *replIsnull, const bool *doReplace)
HeapTuple heap_copytuple(HeapTuple tuple)
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
void heap_freetuple(HeapTuple htup)
#define HeapTupleIsValid(tuple)
static Datum heap_getattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, bool *isnull)
static void * GETSTRUCT(const HeapTupleData *tuple)
void CatalogTupleUpdate(Relation heapRel, const ItemPointerData *otid, HeapTuple tup)
void CatalogTupleInsert(Relation heapRel, HeapTuple tup)
void CatalogTupleDelete(Relation heapRel, const ItemPointerData *tid)
void CacheRegisterSyscacheCallback(SysCacheIdentifier cacheid, SyscacheCallbackFunction func, Datum arg)
List * lappend(List *list, void *datum)
List * list_copy(const List *oldlist)
List * lappend_oid(List *list, Oid datum)
List * lcons(void *datum, List *list)
void list_free(List *list)
bool list_member(const List *list, const void *datum)
#define ShareUpdateExclusiveLock
char * get_rel_name(Oid relid)
bool type_is_range(Oid typid)
Oid get_rel_type_id(Oid relid)
Oid get_range_multirange(Oid rangeOid)
char * get_namespace_name(Oid nspid)
Oid get_array_type(Oid typid)
int GetDatabaseEncoding(void)
char * pg_any_to_server(const char *s, int len, int encoding)
bool pg_verify_mbstr(int encoding, const char *mbstr, int len, bool noError)
void * MemoryContextAllocZero(MemoryContext context, Size size)
char * pstrdup(const char *in)
void pfree(void *pointer)
MemoryContext CurrentMemoryContext
char * pnstrdup(const char *in, Size len)
MemoryContext CacheMemoryContext
void MemoryContextDelete(MemoryContext context)
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
#define SECURITY_LOCAL_USERID_CHANGE
void GetUserIdAndSecContext(Oid *userid, int *sec_context)
BackendType MyBackendType
char * GetUserNameFromId(Oid roleid, bool noerr)
void SetUserIdAndSecContext(Oid userid, int sec_context)
Datum namein(PG_FUNCTION_ARGS)
bool isTempNamespace(Oid namespaceId)
Oid LookupCreationNamespace(const char *nspname)
List * fetch_search_path(bool includeImplicit)
Oid get_namespace_oid(const char *nspname, bool missing_ok)
#define IsA(nodeptr, _type_)
#define InvokeObjectPostCreateHook(classId, objectId, subId)
#define InvokeObjectPostAlterHook(classId, objectId, subId)
void check_object_ownership(Oid roleid, ObjectType objtype, ObjectAddress address, Node *object, Relation relation)
char * getObjectDescription(const ObjectAddress *object, bool missing_ok)
const ObjectAddress InvalidObjectAddress
ObjectAddress get_object_address(ObjectType objtype, Node *object, Relation *relp, LOCKMODE lockmode, bool missing_ok)
#define ObjectAddressSet(addr, class_id, object_id)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
#define CURSOR_OPT_PARALLEL_OK
Oid getExtensionType(Oid extensionOid, const char *typname)
void recordDependencyOn(const ObjectAddress *depender, const ObjectAddress *referenced, DependencyType behavior)
long changeDependencyFor(Oid classId, Oid objectId, Oid refClassId, Oid oldRefObjectId, Oid newRefObjectId)
long deleteDependencyRecordsForClass(Oid classId, Oid objectId, Oid refclassId, char deptype)
Oid getExtensionOfObject(Oid classId, Oid objectId)
END_CATALOG_STRUCT typedef FormData_pg_depend * Form_pg_depend
END_CATALOG_STRUCT typedef FormData_pg_extension * Form_pg_extension
#define lfirst_node(type, lc)
static int list_length(const List *l)
#define forboth(cell1, list1, cell2, list2)
#define foreach_ptr(type, var, lst)
void recordDependencyOnOwner(Oid classId, Oid objectId, Oid owner)
static char buf[DEFAULT_XLOG_SEG_SIZE]
#define pg_valid_server_encoding
#define ERRCODE_UNDEFINED_TABLE
void get_share_path(const char *my_exec_path, char *ret_path)
#define is_absolute_path(filename)
char * last_dir_separator(const char *filename)
char * first_path_var_separator(const char *pathlist)
void canonicalize_path(char *path)
char * first_dir_separator(const char *filename)
size_t strlcpy(char *dst, const char *src, size_t siz)
List * pg_parse_query(const char *query_string)
List * pg_plan_queries(List *querytrees, const char *query_string, int cursorOptions, ParamListInfo boundParams)
List * pg_analyze_and_rewrite_fixedparams(RawStmt *parsetree, const char *query_string, const Oid *paramTypes, int numParams, QueryEnvironment *queryEnv)
static Datum PointerGetDatum(const void *X)
static Datum BoolGetDatum(bool X)
static Datum ObjectIdGetDatum(Oid X)
static Datum CStringGetDatum(const char *X)
void FreeQueryDesc(QueryDesc *qdesc)
QueryDesc * CreateQueryDesc(PlannedStmt *plannedstmt, const char *sourceText, Snapshot snapshot, Snapshot crosscheck_snapshot, DestReceiver *dest, ParamListInfo params, QueryEnvironment *queryEnv, int instrument_options)
char * psprintf(const char *fmt,...)
const char * CleanQuerytext(const char *query, int *location, int *len)
Datum textregexreplace(PG_FUNCTION_ARGS)
#define RelationGetDescr(relation)
const char * quote_identifier(const char *ident)
void ScanKeyInit(ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument)
Oid CreateSchemaCommand(CreateSchemaStmt *stmt, const char *queryString, int stmt_location, int stmt_len)
Snapshot GetTransactionSnapshot(void)
void PushActiveSnapshot(Snapshot snapshot)
void PopActiveSnapshot(void)
Snapshot GetActiveSnapshot(void)
void relation_close(Relation relation, LOCKMODE lockmode)
#define BTEqualStrategyNumber
#define ERRCODE_DUPLICATE_OBJECT
void appendStringInfo(StringInfo str, const char *fmt,...)
void appendStringInfoString(StringInfo str, const char *s)
void initStringInfo(StringInfo str)
struct ConfigVariable * next
struct ErrorContextCallback * previous
struct ExtensionSiblingCache * next
struct ExtensionVersionInfo * previous
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(SysCacheIdentifier cacheId, Datum key1)
#define GetSysCacheHashValue1(cacheId, key1)
#define GetSysCacheOid1(cacheId, oidcol, key1)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)
void tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc, const Datum *values, const bool *isnull)
void ProcessUtility(PlannedStmt *pstmt, const char *queryString, bool readOnlyTree, ProcessUtilityContext context, ParamListInfo params, QueryEnvironment *queryEnv, DestReceiver *dest, QueryCompletion *qc)
String * makeString(char *str)
bool SplitIdentifierString(char *rawstring, char separator, List **namelist)
char * text_to_cstring(const text *t)
Datum replace_text(PG_FUNCTION_ARGS)
void CommandCounterIncrement(void)
#define XACT_FLAGS_ACCESSEDTEMPNAMESPACE