65#include "utils/fmgroids.h"
216 return "<insufficient privilege>";
237 errmsg(
"extension \"%s\" does not exist",
389 if (hashvalue == 0 ||
411 errdetail(
"Extension names must not be empty.")));
420 errdetail(
"Extension names must not contain \"--\".")));
432 errdetail(
"Extension names must not begin or end with \"-\".")));
442 errdetail(
"Extension names must not contain directory separator characters.")));
458 errdetail(
"Version names must not be empty.")));
467 errdetail(
"Version names must not contain \"--\".")));
476 errdetail(
"Version names must not begin or end with \"-\".")));
486 errdetail(
"Version names must not contain directory separator characters.")));
529 paths =
lappend(paths, location);
572 paths =
lappend(paths, location);
720 errmsg(
"extension \"%s\" is not available", control->
name),
721 errhint(
"The extension must first be installed on the system where PostgreSQL is running.")));
743 errmsg(
"could not open extension control file \"%s\": %m",
759 for (item = head; item !=
NULL; item = item->
next)
766 errmsg(
"parameter \"%s\" cannot be set in a secondary extension control file",
771 else if (
strcmp(item->
name,
"default_version") == 0)
776 errmsg(
"parameter \"%s\" cannot be set in a secondary extension control file",
781 else if (
strcmp(item->
name,
"module_pathname") == 0)
793 else if (
strcmp(item->
name,
"relocatable") == 0)
798 errmsg(
"parameter \"%s\" requires a Boolean value",
801 else if (
strcmp(item->
name,
"superuser") == 0)
806 errmsg(
"parameter \"%s\" requires a Boolean value",
814 errmsg(
"parameter \"%s\" requires a Boolean value",
823 errmsg(
"\"%s\" is not a valid encoding name",
837 errmsg(
"parameter \"%s\" must be a list of extension names",
841 else if (
strcmp(item->
name,
"no_relocate") == 0)
852 errmsg(
"parameter \"%s\" must be a list of extension names",
859 errmsg(
"unrecognized parameter \"%s\" in file \"%s\"",
868 errmsg(
"parameter \"schema\" cannot be specified when \"relocatable\" is true")));
955 const char *query = callback_arg->
sql;
998 for (
int loc = 0; loc <
slen; loc++)
1000 if (query[loc] !=
';')
1002 if (query[loc + 1] ==
'\r')
1004 if (query[loc + 1] ==
'\n')
1037 else if (location >= 0)
1066 for (query = callback_arg->
sql; *query; query++)
1073 errcontext(
"extension script file \"%s\", near line %d",
1105 callback_arg.
sql = sql;
1146 "execute_sql_string per-statement context",
1160 foreach(
lc2, stmt_list)
1189 errmsg(
"transaction control statements are not allowed within an extension script")));
1246 const char *version,
1252 Oid save_userid = 0;
1253 int save_sec_context = 0;
1271 errmsg(
"permission denied to create extension \"%s\"",
1274 ?
errhint(
"Must have CREATE privilege on current database to create this extension.")
1275 :
errhint(
"Must be superuser to create this extension.")));
1279 errmsg(
"permission denied to update extension \"%s\"",
1282 ?
errhint(
"Must have CREATE privilege on current database to update this extension.")
1283 :
errhint(
"Must be superuser to update this extension.")));
1289 elog(
DEBUG1,
"executing extension script for \"%s\" version '%s'", control->
name, version);
1291 elog(
DEBUG1,
"executing extension script for \"%s\" update from version '%s' to '%s'", control->
name,
from_version, version);
1416 errmsg(
"invalid character in extension owner: must not contain any of \"%s\"",
1440 errmsg(
"invalid character in extension \"%s\" schema: must not contain any of \"%s\"",
1467 errmsg(
"invalid character in extension \"%s\" schema: must not contain any of \"%s\"",
1532 evi->installable =
false;
1534 evi->distance_known =
false;
1560 if (
evi2->distance_known)
1564 evi->distance >
evi2->distance)
1613 evi->installable =
true;
1662 errmsg(
"extension \"%s\" has no update path from version \"%s\" to version \"%s\"",
1704 evi->distance_known =
false;
1716 evi->distance_known =
true;
1719 foreach(
lc,
evi->reachable)
1798 if (!
evi1->installable)
1870 errmsg(
"version to install must be specified")));
1907 errmsg(
"extension \"%s\" has no installation script nor update path for version \"%s\"",
1941 errmsg(
"extension \"%s\" must be installed in schema \"%s\"",
1958 csstmt->if_not_exists =
false;
1978 if (search_path ==
NIL)
1981 errmsg(
"no schema has been selected to create in")));
1987 errmsg(
"no schema has been selected to create in")));
2014 foreach(
lc, control->requires)
2094 foreach(
lc, parents)
2101 errmsg(
"cyclic dependency detected between extensions \"%s\" and \"%s\"",
2106 (
errmsg(
"installing required extension \"%s\"",
2129 errmsg(
"required extension \"%s\" is not installed",
2132 errhint(
"Use CREATE EXTENSION ... CASCADE to install required extensions too.") : 0));
2149 bool cascade =
false;
2163 if (
stmt->if_not_exists)
2167 errmsg(
"extension \"%s\" already exists, skipping",
2174 errmsg(
"extension \"%s\" already exists",
2185 errmsg(
"nested CREATE EXTENSION is not supported")));
2188 foreach(
lc,
stmt->options)
2199 else if (
strcmp(
defel->defname,
"new_version") == 0)
2261 memset(nulls, 0,
sizeof(nulls));
2349 errmsg(
"cannot drop extension \"%s\" because it is being modified",
2422 *
strrchr(extname,
'.') =
'\0';
2425 if (
strstr(extname,
"--"))
2443 memset(nulls, 0,
sizeof(nulls));
2522 *
strrchr(extname,
'.') =
'\0';
2525 if (
strstr(extname,
"--"))
2581 if (!
evi->installable)
2590 memset(nulls, 0,
sizeof(nulls));
2610 if (control->requires ==
NIL)
2636 if (
evi2->installable)
2656 if (control->requires ==
NIL)
2682 bool result =
false;
2712 *
strrchr(extname,
'.') =
'\0';
2715 if (
strstr(extname,
"--"))
2749 foreach(
lc,
requires)
2806 memset(nulls, 0,
sizeof(nulls));
2876 errmsg(
"%s can only be called from an SQL script executed by CREATE EXTENSION",
2877 "pg_extension_config_dump()")));
2885 if (tablename ==
NULL)
2888 errmsg(
"OID %u does not refer to a table", tableoid)));
2893 errmsg(
"table \"%s\" is not a member of the extension being created",
2918 elog(
ERROR,
"could not find tuple for extension %u",
2952 elog(
ERROR,
"extconfig is not a 1-D Oid array");
2985 elog(
ERROR,
"extconfig and extcondition arrays do not match");
2997 elog(
ERROR,
"extcondition is not a 1-D text array");
2999 elog(
ERROR,
"extconfig and extcondition arrays do not match");
3049 bool nulls[3] = {0};
3115 elog(
ERROR,
"could not find tuple for extension %u",
3141 elog(
ERROR,
"extconfig is not a 1-D Oid array");
3185 dvalues[
i] = dvalues[
i + 1];
3198 elog(
ERROR,
"extconfig and extcondition arrays do not match");
3208 elog(
ERROR,
"extcondition is not a 1-D text array");
3210 elog(
ERROR,
"extconfig and extcondition arrays do not match");
3229 dvalues[
i] = dvalues[
i + 1];
3292 errmsg(
"cannot move extension \"%s\" into schema \"%s\" "
3293 "because the extension contains the schema",
3310 elog(
ERROR,
"could not find tuple for extension %u",
3333 errmsg(
"extension \"%s\" does not support SET SCHEMA",
3390 errmsg(
"cannot SET SCHEMA of extension \"%s\" because other extensions prevent it",
3392 errdetail(
"Extension \"%s\" requests no relocation of extension \"%s\".",
3411 if (
dep.objectSubId != 0)
3412 elog(
ERROR,
"extension should not have a sub-object dependency");
3427 errmsg(
"extension \"%s\" does not support SET SCHEMA",
3429 errdetail(
"%s is not in the extension's schema \"%s\"",
3452 elog(
ERROR,
"could not change schema dependency for extension %s",
3490 errmsg(
"nested ALTER EXTENSION is not supported")));
3510 errmsg(
"extension \"%s\" does not exist",
3543 foreach(
lc,
stmt->options)
3568 errmsg(
"version to install must be specified")));
3579 (
errmsg(
"version \"%s\" of extension \"%s\" is already installed",
3597 NULL,
false,
false);
3662 elog(
ERROR,
"could not find tuple for extension %u",
3677 memset(nulls, 0,
sizeof(nulls));
3678 memset(repl, 0,
sizeof(repl));
3703 foreach(
lc, control->requires)
3778 switch (
stmt->objtype)
3790 errmsg(
"cannot add an object of this type to an extension")));
3823 Assert(
object.objectSubId == 0);
3829 stmt->object, relation);
3843 if (relation !=
NULL)
3868 if (
stmt->action > 0)
3876 errmsg(
"%s is already a member of extension \"%s\"",
3888 errmsg(
"cannot add schema \"%s\" to extension \"%s\" "
3889 "because the schema contains the extension",
3916 errmsg(
"%s is not a member of extension \"%s\"",
3926 elog(
ERROR,
"unexpected number of extension dependency records");
3970 errmsg(
"could not find multirange type for data type %s",
4018 errmsg(
"could not open file \"%s\" for reading: %m",
4047 for (s = d =
buf; *s; s++)
4049 if (!(*s ==
'\r' && s[1] ==
'\n'))
4089 foreach(cell, paths)
4092 char *path = location->
loc;
4104 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 internalerrquery(const char *query)
int internalerrposition(int cursorpos)
int errcode_for_file_access(void)
int errdetail(const char *fmt,...)
ErrorContextCallback * error_context_stack
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
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 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)
static void ext_sibling_callback(Datum arg, int cacheid, uint32 hashvalue)
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(int 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)
FormData_pg_depend * Form_pg_depend
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(int 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