64#include "utils/fmgroids.h"
195 return "<insufficient privilege>";
216 errmsg(
"extension \"%s\" does not exist",
282 errdetail(
"Extension names must not be empty.")));
291 errdetail(
"Extension names must not contain \"--\".")));
303 errdetail(
"Extension names must not begin or end with \"-\".")));
313 errdetail(
"Extension names must not contain directory separator characters.")));
329 errdetail(
"Version names must not be empty.")));
338 errdetail(
"Version names must not contain \"--\".")));
347 errdetail(
"Version names must not begin or end with \"-\".")));
357 errdetail(
"Version names must not contain directory separator characters.")));
400 paths =
lappend(paths, location);
443 paths =
lappend(paths, location);
591 errmsg(
"extension \"%s\" is not available", control->
name),
592 errhint(
"The extension must first be installed on the system where PostgreSQL is running.")));
614 errmsg(
"could not open extension control file \"%s\": %m",
630 for (item = head; item !=
NULL; item = item->
next)
637 errmsg(
"parameter \"%s\" cannot be set in a secondary extension control file",
642 else if (
strcmp(item->
name,
"default_version") == 0)
647 errmsg(
"parameter \"%s\" cannot be set in a secondary extension control file",
652 else if (
strcmp(item->
name,
"module_pathname") == 0)
664 else if (
strcmp(item->
name,
"relocatable") == 0)
669 errmsg(
"parameter \"%s\" requires a Boolean value",
672 else if (
strcmp(item->
name,
"superuser") == 0)
677 errmsg(
"parameter \"%s\" requires a Boolean value",
685 errmsg(
"parameter \"%s\" requires a Boolean value",
694 errmsg(
"\"%s\" is not a valid encoding name",
708 errmsg(
"parameter \"%s\" must be a list of extension names",
712 else if (
strcmp(item->
name,
"no_relocate") == 0)
723 errmsg(
"parameter \"%s\" must be a list of extension names",
730 errmsg(
"unrecognized parameter \"%s\" in file \"%s\"",
739 errmsg(
"parameter \"schema\" cannot be specified when \"relocatable\" is true")));
826 const char *query = callback_arg->
sql;
869 for (
int loc = 0; loc <
slen; loc++)
871 if (query[loc] !=
';')
873 if (query[loc + 1] ==
'\r')
875 if (query[loc + 1] ==
'\n')
908 else if (location >= 0)
937 for (query = callback_arg->
sql; *query; query++)
944 errcontext(
"extension script file \"%s\", near line %d",
976 callback_arg.
sql = sql;
1017 "execute_sql_string per-statement context",
1031 foreach(
lc2, stmt_list)
1060 errmsg(
"transaction control statements are not allowed within an extension script")));
1117 const char *version,
1123 Oid save_userid = 0;
1124 int save_sec_context = 0;
1142 errmsg(
"permission denied to create extension \"%s\"",
1145 ?
errhint(
"Must have CREATE privilege on current database to create this extension.")
1146 :
errhint(
"Must be superuser to create this extension.")));
1150 errmsg(
"permission denied to update extension \"%s\"",
1153 ?
errhint(
"Must have CREATE privilege on current database to update this extension.")
1154 :
errhint(
"Must be superuser to update this extension.")));
1160 elog(
DEBUG1,
"executing extension script for \"%s\" version '%s'", control->
name, version);
1162 elog(
DEBUG1,
"executing extension script for \"%s\" update from version '%s' to '%s'", control->
name,
from_version, version);
1287 errmsg(
"invalid character in extension owner: must not contain any of \"%s\"",
1311 errmsg(
"invalid character in extension \"%s\" schema: must not contain any of \"%s\"",
1338 errmsg(
"invalid character in extension \"%s\" schema: must not contain any of \"%s\"",
1403 evi->installable =
false;
1405 evi->distance_known =
false;
1431 if (
evi2->distance_known)
1435 evi->distance >
evi2->distance)
1484 evi->installable =
true;
1533 errmsg(
"extension \"%s\" has no update path from version \"%s\" to version \"%s\"",
1575 evi->distance_known =
false;
1587 evi->distance_known =
true;
1590 foreach(
lc,
evi->reachable)
1669 if (!
evi1->installable)
1741 errmsg(
"version to install must be specified")));
1778 errmsg(
"extension \"%s\" has no installation script nor update path for version \"%s\"",
1812 errmsg(
"extension \"%s\" must be installed in schema \"%s\"",
1829 csstmt->if_not_exists =
false;
1849 if (search_path ==
NIL)
1852 errmsg(
"no schema has been selected to create in")));
1858 errmsg(
"no schema has been selected to create in")));
1885 foreach(
lc, control->requires)
1965 foreach(
lc, parents)
1972 errmsg(
"cyclic dependency detected between extensions \"%s\" and \"%s\"",
1977 (
errmsg(
"installing required extension \"%s\"",
2000 errmsg(
"required extension \"%s\" is not installed",
2003 errhint(
"Use CREATE EXTENSION ... CASCADE to install required extensions too.") : 0));
2020 bool cascade =
false;
2034 if (
stmt->if_not_exists)
2038 errmsg(
"extension \"%s\" already exists, skipping",
2045 errmsg(
"extension \"%s\" already exists",
2056 errmsg(
"nested CREATE EXTENSION is not supported")));
2059 foreach(
lc,
stmt->options)
2070 else if (
strcmp(
defel->defname,
"new_version") == 0)
2132 memset(nulls, 0,
sizeof(nulls));
2220 errmsg(
"cannot drop extension \"%s\" because it is being modified",
2293 *
strrchr(extname,
'.') =
'\0';
2296 if (
strstr(extname,
"--"))
2314 memset(nulls, 0,
sizeof(nulls));
2393 *
strrchr(extname,
'.') =
'\0';
2396 if (
strstr(extname,
"--"))
2452 if (!
evi->installable)
2461 memset(nulls, 0,
sizeof(nulls));
2481 if (control->requires ==
NIL)
2507 if (
evi2->installable)
2527 if (control->requires ==
NIL)
2553 bool result =
false;
2583 *
strrchr(extname,
'.') =
'\0';
2586 if (
strstr(extname,
"--"))
2620 foreach(
lc,
requires)
2677 memset(nulls, 0,
sizeof(nulls));
2747 errmsg(
"%s can only be called from an SQL script executed by CREATE EXTENSION",
2748 "pg_extension_config_dump()")));
2756 if (tablename ==
NULL)
2759 errmsg(
"OID %u does not refer to a table", tableoid)));
2764 errmsg(
"table \"%s\" is not a member of the extension being created",
2789 elog(
ERROR,
"could not find tuple for extension %u",
2823 elog(
ERROR,
"extconfig is not a 1-D Oid array");
2856 elog(
ERROR,
"extconfig and extcondition arrays do not match");
2868 elog(
ERROR,
"extcondition is not a 1-D text array");
2870 elog(
ERROR,
"extconfig and extcondition arrays do not match");
2920 bool nulls[3] = {0};
2986 elog(
ERROR,
"could not find tuple for extension %u",
3012 elog(
ERROR,
"extconfig is not a 1-D Oid array");
3056 dvalues[
i] = dvalues[
i + 1];
3069 elog(
ERROR,
"extconfig and extcondition arrays do not match");
3079 elog(
ERROR,
"extcondition is not a 1-D text array");
3081 elog(
ERROR,
"extconfig and extcondition arrays do not match");
3100 dvalues[
i] = dvalues[
i + 1];
3163 errmsg(
"cannot move extension \"%s\" into schema \"%s\" "
3164 "because the extension contains the schema",
3181 elog(
ERROR,
"could not find tuple for extension %u",
3204 errmsg(
"extension \"%s\" does not support SET SCHEMA",
3261 errmsg(
"cannot SET SCHEMA of extension \"%s\" because other extensions prevent it",
3263 errdetail(
"Extension \"%s\" requests no relocation of extension \"%s\".",
3282 if (
dep.objectSubId != 0)
3283 elog(
ERROR,
"extension should not have a sub-object dependency");
3298 errmsg(
"extension \"%s\" does not support SET SCHEMA",
3300 errdetail(
"%s is not in the extension's schema \"%s\"",
3323 elog(
ERROR,
"could not change schema dependency for extension %s",
3361 errmsg(
"nested ALTER EXTENSION is not supported")));
3381 errmsg(
"extension \"%s\" does not exist",
3414 foreach(
lc,
stmt->options)
3439 errmsg(
"version to install must be specified")));
3450 (
errmsg(
"version \"%s\" of extension \"%s\" is already installed",
3468 NULL,
false,
false);
3533 elog(
ERROR,
"could not find tuple for extension %u",
3548 memset(nulls, 0,
sizeof(nulls));
3549 memset(repl, 0,
sizeof(repl));
3574 foreach(
lc, control->requires)
3649 switch (
stmt->objtype)
3661 errmsg(
"cannot add an object of this type to an extension")));
3694 Assert(
object.objectSubId == 0);
3700 stmt->object, relation);
3714 if (relation !=
NULL)
3739 if (
stmt->action > 0)
3747 errmsg(
"%s is already a member of extension \"%s\"",
3759 errmsg(
"cannot add schema \"%s\" to extension \"%s\" "
3760 "because the schema contains the extension",
3787 errmsg(
"%s is not a member of extension \"%s\"",
3797 elog(
ERROR,
"unexpected number of extension dependency records");
3841 errmsg(
"could not find multirange type for data type %s",
3889 errmsg(
"could not open file \"%s\" for reading: %m",
3918 for (s = d =
buf; *s; s++)
3920 if (!(*s ==
'\r' && s[1] ==
'\n'))
3960 foreach(cell, paths)
3963 char *path = location->
loc;
3975 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)
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 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)
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)
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)
char * pstrdup(const char *in)
void pfree(void *pointer)
MemoryContext CurrentMemoryContext
char * pnstrdup(const char *in, Size len)
void MemoryContextDelete(MemoryContext context)
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
#define SECURITY_LOCAL_USERID_CHANGE
void GetUserIdAndSecContext(Oid *userid, int *sec_context)
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
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 ExtensionVersionInfo * previous
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum 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