234 bool include_out_arguments,
int pronargs,
235 int **argnumbers,
int *fgc_flags);
275 return a.roleid ==
b.roleid &&
276 strcmp(
a.searchPath,
b.searchPath) == 0;
279#define SH_PREFIX nsphash
280#define SH_ELEMENT_TYPE SearchPathCacheEntry
281#define SH_KEY_TYPE SearchPathCacheKey
283#define SH_HASH_KEY(tb, key) spcachekey_hash(key)
284#define SH_EQUAL(tb, a, b) spcachekey_equal(a, b)
285#define SH_SCOPE static inline
296#define SPCACHE_RESET_THRESHOLD 256
325 "search_path processing cache",
460 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
461 errmsg(
"cross-database references are not implemented: \"%s.%s.%s\"",
517 (
errcode(ERRCODE_INVALID_TABLE_DEFINITION),
518 errmsg(
"temporary tables cannot specify a schema name")));
552 callback(relation, relId, oldRelId, callback_arg);
575 if (relId == oldRelId)
598 (
errcode(ERRCODE_LOCK_NOT_AVAILABLE),
599 errmsg(
"could not obtain lock on relation \"%s.%s\"",
603 (
errcode(ERRCODE_LOCK_NOT_AVAILABLE),
604 errmsg(
"could not obtain lock on relation \"%s\"",
632 errmsg(
"relation \"%s.%s\" does not exist",
637 errmsg(
"relation \"%s\" does not exist",
664 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
665 errmsg(
"cross-database references are not implemented: \"%s.%s.%s\"",
673 if (strcmp(newRelation->
schemaname,
"pg_temp") == 0)
702 (
errcode(ERRCODE_UNDEFINED_SCHEMA),
703 errmsg(
"no schema has been selected to create in")));
740 Oid *existing_relation_id)
756 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
757 errmsg(
"cross-database references are not implemented: \"%s.%s.%s\"",
777 if (existing_relation_id != NULL)
799 if (relid == oldrelid &&
nspid == oldnspid)
802 if (
nspid != oldnspid)
811 if (
nspid != oldnspid)
820 if (relid != oldrelid)
835 if (existing_relation_id != NULL)
836 *existing_relation_id = relid;
849 case RELPERSISTENCE_TEMP:
854 (
errcode(ERRCODE_INVALID_TABLE_DEFINITION),
855 errmsg(
"cannot create relations in temporary schemas of other sessions")));
858 (
errcode(ERRCODE_INVALID_TABLE_DEFINITION),
859 errmsg(
"cannot create temporary relation in non-temporary schema")));
862 case RELPERSISTENCE_PERMANENT:
867 (
errcode(ERRCODE_INVALID_TABLE_DEFINITION),
868 errmsg(
"cannot create relations in temporary schemas of other sessions")));
873 (
errcode(ERRCODE_INVALID_TABLE_DEFINITION),
874 errmsg(
"only temporary relations may be created in temporary schemas")));
934 if (is_missing != NULL)
939 elog(
ERROR,
"cache lookup failed for relation %u", relid);
950 relnamespace = relform->relnamespace;
951 if (relnamespace != PG_CATALOG_NAMESPACE &&
969 if (namespaceId == relnamespace)
1061 if (is_missing != NULL)
1066 elog(
ERROR,
"cache lookup failed for type %u", typid);
1077 typnamespace = typform->typnamespace;
1078 if (typnamespace != PG_CATALOG_NAMESPACE &&
1096 if (namespaceId == typnamespace)
1198 bool expand_variadic,
bool expand_defaults,
1199 bool include_out_arguments,
bool missing_ok,
1203 bool any_special =
false;
1211 Assert(nargs >= 0 || !(expand_variadic | expand_defaults));
1242 Oid *proargtypes = procform->proargtypes.values;
1244 int effective_nargs;
1249 int *argnumbers = NULL;
1257 if (procform->pronamespace != namespaceId)
1270 if (procform->pronamespace ==
lfirst_oid(nsp) &&
1287 if (include_out_arguments)
1289 Datum proallargtypes;
1293 Anum_pg_proc_proallargtypes,
1304 elog(
ERROR,
"proallargtypes is not a 1-D Oid array or it contains nulls");
1310 if (argnames !=
NIL)
1319 if (
pronargs > nargs && expand_defaults)
1322 if (nargs + procform->pronargdefaults <
pronargs)
1324 use_defaults =
true;
1327 use_defaults =
false;
1330 if (
pronargs != nargs && !use_defaults)
1339 &argnumbers, fgc_flags))
1352 if (
OidIsValid(procform->provariadic) && expand_variadic)
1372 if (
pronargs <= nargs && expand_variadic)
1374 va_elem_type = procform->provariadic;
1376 any_special |= variadic;
1387 if (
pronargs > nargs && expand_defaults)
1390 if (nargs + procform->pronargdefaults <
pronargs)
1392 use_defaults =
true;
1396 use_defaults =
false;
1399 if (nargs >= 0 &&
pronargs != nargs && !variadic && !use_defaults)
1415 effective_nargs *
sizeof(
Oid));
1417 newResult->
oid = procform->oid;
1419 newResult->
nargs = effective_nargs;
1425 newResult->
args[
j] = proargtypes[argnumbers[
j]];
1436 for (
int j =
pronargs - 1;
j < effective_nargs;
j++)
1437 newResult->
args[
j] = va_elem_type;
1451 if (resultList != NULL &&
1467 if (catlist->
ordered && !any_special)
1470 if (effective_nargs == resultList->
nargs &&
1471 memcmp(newResult->
args,
1473 effective_nargs *
sizeof(
Oid)) == 0)
1474 prevResult = resultList;
1480 int cmp_nargs = newResult->
nargs - newResult->
ndargs;
1482 for (prevResult = resultList;
1484 prevResult = prevResult->
next)
1486 if (cmp_nargs == prevResult->
nargs - prevResult->
ndargs &&
1487 memcmp(newResult->
args,
1489 cmp_nargs *
sizeof(
Oid)) == 0)
1505 if (pathpos != prevResult->
pathpos)
1510 preference = pathpos - prevResult->
pathpos;
1512 else if (variadic && prevResult->
nvargs == 0)
1522 else if (!variadic && prevResult->
nvargs > 0)
1546 else if (preference < 0)
1549 if (prevResult == resultList)
1550 resultList = prevResult->
next;
1555 for (prevPrevResult = resultList;
1557 prevPrevResult = prevPrevResult->
next)
1559 if (prevResult == prevPrevResult->
next)
1561 prevPrevResult->
next = prevResult->
next;
1583 newResult->
next = resultList;
1584 resultList = newResult;
1617 bool include_out_arguments,
int pronargs,
1618 int **argnumbers,
int *fgc_flags)
1627 bool arg_filled_twice =
false;
1645 &p_argtypes, &p_argnames, &p_argmodes);
1646 Assert(p_argnames != NULL);
1652 memset(arggiven,
false,
pronargs *
sizeof(
bool));
1655 for (ap = 0; ap < numposargs; ap++)
1657 (*argnumbers)[ap] = ap;
1658 arggiven[ap] =
true;
1662 foreach(lc, argnames)
1664 char *argname = (
char *)
lfirst(lc);
1670 for (
i = 0;
i < pronallargs;
i++)
1673 if (!include_out_arguments &&
1679 if (p_argnames[
i] && strcmp(p_argnames[
i], argname) == 0)
1683 arg_filled_twice =
true;
1684 arggiven[pp] =
true;
1685 (*argnumbers)[ap] = pp;
1704 if (arg_filled_twice)
1713 int first_arg_with_default =
pronargs - procform->pronargdefaults;
1715 for (pp = numposargs; pp <
pronargs; pp++)
1720 if (pp < first_arg_with_default)
1722 (*argnumbers)[ap++] = pp;
1763 if (is_missing != NULL)
1768 elog(
ERROR,
"cache lookup failed for function %u", funcid);
1779 pronamespace = procform->pronamespace;
1780 if (pronamespace != PG_CATALOG_NAMESPACE &&
1792 int nargs = procform->pronargs;
1799 nargs,
NIL,
false,
false,
false,
false,
1802 for (; clist; clist = clist->
next)
1804 if (memcmp(clist->
args, procform->proargtypes.values,
1805 nargs *
sizeof(
Oid)) == 0)
1808 visible = (clist->
oid == funcid);
1860 Oid result = operclass->oid;
1903 if (operform->oprnamespace == namespaceId)
1905 Oid result = operform->oid;
1949 char *resultSpace = NULL;
1991#define SPACE_PER_OP MAXALIGN(offsetof(struct _FuncCandidateList, args) + \
2005 if (oprkind && operform->oprkind != oprkind)
2013 if (operform->oprnamespace != namespaceId)
2027 if (operform->oprnamespace ==
lfirst_oid(nsp) &&
2052 if (operform->oprleft == resultList->
args[0] &&
2053 operform->oprright == resultList->
args[1])
2054 prevResult = resultList;
2060 for (prevResult = resultList;
2062 prevResult = prevResult->
next)
2064 if (operform->oprleft == prevResult->
args[0] &&
2065 operform->oprright == prevResult->
args[1])
2073 if (pathpos > prevResult->
pathpos)
2076 prevResult->
pathpos = pathpos;
2077 prevResult->
oid = operform->oid;
2092 newResult->
oid = operform->oid;
2094 newResult->
nargs = 2;
2098 newResult->
args[0] = operform->oprleft;
2099 newResult->
args[1] = operform->oprright;
2100 newResult->
next = resultList;
2101 resultList = newResult;
2138 if (is_missing != NULL)
2154 oprnamespace = oprform->oprnamespace;
2155 if (oprnamespace != PG_CATALOG_NAMESPACE &&
2166 char *oprname =
NameStr(oprform->oprname);
2169 oprform->oprleft, oprform->oprright)
2243 if (is_missing != NULL)
2248 elog(
ERROR,
"cache lookup failed for opclass %u", opcid);
2259 opcnamespace = opcform->opcnamespace;
2260 if (opcnamespace != PG_CATALOG_NAMESPACE &&
2271 char *opcname =
NameStr(opcform->opcname);
2345 if (is_missing != NULL)
2350 elog(
ERROR,
"cache lookup failed for opfamily %u", opfid);
2361 opfnamespace = opfform->opfnamespace;
2362 if (opfnamespace != PG_CATALOG_NAMESPACE &&
2373 char *opfname =
NameStr(opfform->opfname);
2416 if (collform->collprovider == COLLPROVIDER_ICU)
2496 if (is_missing != NULL)
2512 collnamespace = collform->collnamespace;
2513 if (collnamespace != PG_CATALOG_NAMESPACE &&
2525 char *collname =
NameStr(collform->collname);
2598 if (is_missing != NULL)
2603 elog(
ERROR,
"cache lookup failed for conversion %u", conid);
2614 connamespace = conform->connamespace;
2615 if (connamespace != PG_CATALOG_NAMESPACE &&
2626 char *conname =
NameStr(conform->conname);
2660 stats_oid =
GetSysCacheOid2(STATEXTNAMENSP, Anum_pg_statistic_ext_oid,
2675 stats_oid =
GetSysCacheOid2(STATEXTNAMENSP, Anum_pg_statistic_ext_oid,
2685 (
errcode(ERRCODE_UNDEFINED_OBJECT),
2686 errmsg(
"statistics object \"%s\" does not exist",
2721 if (is_missing != NULL)
2726 elog(
ERROR,
"cache lookup failed for statistics object %u", stxid);
2737 stxnamespace = stxform->stxnamespace;
2738 if (stxnamespace != PG_CATALOG_NAMESPACE &&
2748 char *stxname =
NameStr(stxform->stxname);
2756 if (namespaceId == stxnamespace)
2827 (
errcode(ERRCODE_UNDEFINED_OBJECT),
2828 errmsg(
"text search parser \"%s\" does not exist",
2863 if (is_missing != NULL)
2868 elog(
ERROR,
"cache lookup failed for text search parser %u", prsId);
2879 namespace = form->prsnamespace;
2880 if (
namespace != PG_CATALOG_NAMESPACE &&
2901 if (namespaceId ==
namespace)
2972 (
errcode(ERRCODE_UNDEFINED_OBJECT),
2973 errmsg(
"text search dictionary \"%s\" does not exist",
3008 if (is_missing != NULL)
3013 elog(
ERROR,
"cache lookup failed for text search dictionary %u",
3025 namespace = form->dictnamespace;
3026 if (
namespace != PG_CATALOG_NAMESPACE &&
3047 if (namespaceId ==
namespace)
3077 char *template_name;
3118 (
errcode(ERRCODE_UNDEFINED_OBJECT),
3119 errmsg(
"text search template \"%s\" does not exist",
3154 if (is_missing != NULL)
3159 elog(
ERROR,
"cache lookup failed for text search template %u", tmplId);
3170 namespace = form->tmplnamespace;
3171 if (
namespace != PG_CATALOG_NAMESPACE &&
3192 if (namespaceId ==
namespace)
3263 (
errcode(ERRCODE_UNDEFINED_OBJECT),
3264 errmsg(
"text search configuration \"%s\" does not exist",
3299 if (is_missing != NULL)
3304 elog(
ERROR,
"cache lookup failed for text search configuration %u",
3316 namespace = form->cfgnamespace;
3317 if (
namespace != PG_CATALOG_NAMESPACE &&
3338 if (namespaceId ==
namespace)
3373 char *schemaname = NULL;
3374 char *objname = NULL;
3395 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
3396 errmsg(
"cross-database references are not implemented: %s",
3401 (
errcode(ERRCODE_SYNTAX_ERROR),
3402 errmsg(
"improper qualified name (too many dotted names): %s",
3407 *nspname_p = schemaname;
3408 *objname_p = objname;
3425 if (strcmp(nspname,
"pg_temp") == 0)
3458 if (strcmp(nspname,
"pg_temp") == 0)
3501 if (strcmp(nspname,
"pg_temp") == 0)
3531 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
3532 errmsg(
"cannot move objects into or out of temporary schemas")));
3535 if (nspOid == PG_TOAST_NAMESPACE || oldNspOid == PG_TOAST_NAMESPACE)
3537 (
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
3538 errmsg(
"cannot move objects into or out of TOAST schema")));
3565 if (strcmp(schemaname,
"pg_temp") == 0)
3588 (
errcode(ERRCODE_UNDEFINED_SCHEMA),
3589 errmsg(
"no schema has been selected to create in")));
3610 (
errcode(ERRCODE_UNDEFINED_SCHEMA),
3611 errmsg(
"schema \"%s\" does not exist", nspname)));
3641 (
errcode(ERRCODE_SYNTAX_ERROR),
3642 errmsg(
"improper relation name (too many dotted names): %s",
3680 elog(
ERROR,
"unexpected node type in name list: %d",
3763 result = (strncmp(nspname,
"pg_temp_", 8) == 0) ||
3764 (strncmp(nspname,
"pg_toast_temp_", 14) == 0);
3842 if (strncmp(nspname,
"pg_temp_", 8) == 0)
3843 result = atoi(nspname + 8);
3844 else if (strncmp(nspname,
"pg_toast_temp_", 14) == 0)
3845 result = atoi(nspname + 14);
4003 if (lc &&
lfirst_oid(lc) == PG_CATALOG_NAMESPACE)
4041 char *collation_name;
4082 (
errcode(ERRCODE_UNDEFINED_OBJECT),
4083 errmsg(
"collation \"%s\" for encoding \"%s\" does not exist",
4095 char *conversion_name;
4137 (
errcode(ERRCODE_UNDEFINED_OBJECT),
4138 errmsg(
"conversion \"%s\" does not exist",
4183 rawname =
pstrdup(searchPath);
4200 *temp_missing =
false;
4201 foreach(l, namelist)
4203 char *curname = (
char *)
lfirst(l);
4206 if (strcmp(curname,
"$user") == 0)
4225 else if (strcmp(curname,
"pg_temp") == 0)
4234 *temp_missing =
true;
4270 foreach(lc, oidlist)
4286 if (finalPath ==
NIL)
4297 finalPath =
lcons_oid(PG_CATALOG_NAMESPACE, finalPath);
4382 pathChanged =
false;
4478 (
errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
4479 errmsg(
"permission denied to create temporary tables in database \"%s\"",
4494 (
errcode(ERRCODE_READ_ONLY_SQL_TRANSACTION),
4495 errmsg(
"cannot create temporary tables during recovery")));
4500 (
errcode(ERRCODE_READ_ONLY_SQL_TRANSACTION),
4501 errmsg(
"cannot create temporary tables during a parallel operation")));
4535 snprintf(namespaceName,
sizeof(namespaceName),
"pg_toast_temp_%d",
4676 object.
classId = NamespaceRelationId;
4677 object.objectId = tempNamespaceId;
4678 object.objectSubId = 0;
4727 const char *searchPath = *
newval;
4757 rawname =
pstrdup(searchPath);
4906 if (!includeImplicit)
4940 if (count < sarray_len)
4941 sarray[count] = namespaceId;
4965 bool is_missing =
false;
4979 bool is_missing =
false;
4993 bool is_missing =
false;
5007 bool is_missing =
false;
5021 bool is_missing =
false;
5035 bool is_missing =
false;
5049 bool is_missing =
false;
5063 bool is_missing =
false;
5077 bool is_missing =
false;
5091 bool is_missing =
false;
5105 bool is_missing =
false;
5119 bool is_missing =
false;
5133 bool is_missing =
false;
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)
#define DatumGetArrayTypeP(X)
#define InvalidSubTransactionId
#define OidIsValid(objectId)
void performDeletion(const ObjectAddress *object, DropBehavior behavior, int flags)
#define PERFORM_DELETION_SKIP_EXTENSIONS
#define PERFORM_DELETION_QUIETLY
#define PERFORM_DELETION_SKIP_ORIGINAL
#define PERFORM_DELETION_INTERNAL
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
bool is_encoding_supported_by_icu(int encoding)
bool equal(const void *a, const void *b)
#define PG_RETURN_BOOL(x)
int get_func_arg_info(HeapTuple procTup, Oid **p_argtypes, char ***p_argnames, char **p_argmodes)
#define GUC_check_errdetail
Assert(PointerIsAligned(start, uint64))
static size_t fasthash_accum_cstring(fasthash_state *hs, const char *str)
static uint32 fasthash_final32(fasthash_state *hs, uint64 tweak)
static void fasthash_combine(fasthash_state *hs)
static void fasthash_init(fasthash_state *hs, uint64 seed)
#define HeapTupleIsValid(tuple)
static void * GETSTRUCT(const HeapTupleData *tuple)
#define IsParallelWorker()
void AcceptInvalidationMessages(void)
void CacheRegisterSyscacheCallback(int cacheid, SyscacheCallbackFunction func, Datum arg)
void before_shmem_exit(pg_on_exit_callback function, Datum arg)
List * lcons_oid(Oid datum, List *list)
List * list_delete_first(List *list)
List * list_copy(const List *oldlist)
List * lappend_oid(List *list, Oid datum)
void list_free(List *list)
bool list_member_oid(const List *list, Oid datum)
bool ConditionalLockRelationOid(Oid relid, LOCKMODE lockmode)
void UnlockRelationOid(Oid relid, LOCKMODE lockmode)
void LockDatabaseObject(Oid classid, Oid objid, uint16 objsubid, LOCKMODE lockmode)
void LockRelationOid(Oid relid, LOCKMODE lockmode)
void UnlockDatabaseObject(Oid classid, Oid objid, uint16 objsubid, LOCKMODE lockmode)
char * get_database_name(Oid dbid)
char get_rel_relkind(Oid relid)
char * get_namespace_name(Oid nspid)
Oid get_relname_relid(const char *relname, Oid relnamespace)
RangeVar * makeRangeVar(char *schemaname, char *relname, int location)
int GetDatabaseEncoding(void)
const char * GetDatabaseEncodingName(void)
char * MemoryContextStrdup(MemoryContext context, const char *string)
void MemoryContextReset(MemoryContext context)
char * pstrdup(const char *in)
void pfree(void *pointer)
void * palloc0(Size size)
MemoryContext TopMemoryContext
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
#define IsBootstrapProcessingMode()
static const SearchPathCacheEntry * cachedNamespacePath(const char *searchPath, Oid roleid)
Oid RangeVarGetAndCheckCreationNamespace(RangeVar *relation, LOCKMODE lockmode, Oid *existing_relation_id)
Oid OpclassnameGetOpcid(Oid amid, const char *opcname)
static bool CollationIsVisibleExt(Oid collid, bool *is_missing)
bool isTempOrTempToastNamespace(Oid namespaceId)
void ResetTempTableNamespace(void)
static bool baseTempCreationPending
Oid FindDefaultConversionProc(int32 for_encoding, int32 to_encoding)
Oid OpernameGetOprid(List *names, Oid oprleft, Oid oprright)
char * NameListToString(const List *names)
Oid LookupExplicitNamespace(const char *nspname, bool missing_ok)
static SearchPathCacheEntry * spcache_lookup(const char *searchPath, Oid roleid)
Datum pg_is_other_temp_schema(PG_FUNCTION_ARGS)
bool TSTemplateIsVisible(Oid tmplId)
Oid QualifiedNameGetCreationNamespace(const List *names, char **objname_p)
bool OpfamilyIsVisible(Oid opfid)
bool CollationIsVisible(Oid collid)
static Oid baseCreationNamespace
bool TypeIsVisible(Oid typid)
bool isOtherTempNamespace(Oid namespaceId)
static MemoryContext SearchPathCacheContext
static bool searchPathCacheValid
static Oid lookup_collation(const char *collname, Oid collnamespace, int32 encoding)
Oid CollationGetCollid(const char *collname)
void assign_search_path(const char *newval, void *extra)
static Oid activeCreationNamespace
bool isTempNamespace(Oid namespaceId)
bool isAnyTempNamespace(Oid namespaceId)
Datum pg_operator_is_visible(PG_FUNCTION_ARGS)
static List * activeSearchPath
bool ConversionIsVisible(Oid conid)
static bool baseSearchPathValid
static SubTransactionId myTempNamespaceSubID
Oid get_statistics_object_oid(List *names, bool missing_ok)
Oid LookupCreationNamespace(const char *nspname)
void RangeVarAdjustRelationPersistence(RangeVar *newRelation, Oid nspid)
static Oid myTempToastNamespace
Datum pg_collation_is_visible(PG_FUNCTION_ARGS)
Oid get_collation_oid(List *collname, bool missing_ok)
void DeconstructQualifiedName(const List *names, char **nspname_p, char **objname_p)
Datum pg_function_is_visible(PG_FUNCTION_ARGS)
static bool MatchNamedCall(HeapTuple proctup, int nargs, List *argnames, bool include_out_arguments, int pronargs, int **argnumbers, int *fgc_flags)
Datum pg_type_is_visible(PG_FUNCTION_ARGS)
static bool OpclassIsVisibleExt(Oid opcid, bool *is_missing)
static bool RelationIsVisibleExt(Oid relid, bool *is_missing)
List * fetch_search_path(bool includeImplicit)
static bool FunctionIsVisibleExt(Oid funcid, bool *is_missing)
FuncCandidateList OpernameGetCandidates(List *names, char oprkind, bool missing_schema_ok, int *fgc_flags)
Datum pg_opclass_is_visible(PG_FUNCTION_ARGS)
Oid get_namespace_oid(const char *nspname, bool missing_ok)
static SearchPathCacheEntry * spcache_insert(const char *searchPath, Oid roleid)
SearchPathMatcher * GetSearchPathMatcher(MemoryContext context)
Oid TypenameGetTypidExtended(const char *typname, bool temp_ok)
static bool TSDictionaryIsVisibleExt(Oid dictId, bool *is_missing)
char * NameListToQuotedString(const List *names)
Oid RangeVarGetCreationNamespace(const RangeVar *newRelation)
bool RelationIsVisible(Oid relid)
static List * preprocessNamespacePath(const char *searchPath, Oid roleid, bool *temp_missing)
Datum pg_ts_config_is_visible(PG_FUNCTION_ARGS)
static void spcache_init(void)
Datum pg_opfamily_is_visible(PG_FUNCTION_ARGS)
bool OpclassIsVisible(Oid opcid)
Oid ConversionGetConid(const char *conname)
void AtEOSubXact_Namespace(bool isCommit, SubTransactionId mySubid, SubTransactionId parentSubid)
static List * finalNamespacePath(List *oidlist, Oid *firstNS)
TempNamespaceStatus checkTempNamespaceStatus(Oid namespaceId)
Datum pg_conversion_is_visible(PG_FUNCTION_ARGS)
void CheckSetNamespace(Oid oldNspOid, Oid nspOid)
static SearchPathCacheEntry * LastSearchPathCacheEntry
void GetTempNamespaceState(Oid *tempNamespaceId, Oid *tempToastNamespaceId)
void InitializeSearchPath(void)
static bool TSParserIsVisibleExt(Oid prsId, bool *is_missing)
static bool StatisticsObjIsVisibleExt(Oid stxid, bool *is_missing)
bool OperatorIsVisible(Oid oprid)
static bool TSTemplateIsVisibleExt(Oid tmplId, bool *is_missing)
char * namespace_search_path
bool TSParserIsVisible(Oid prsId)
static void RemoveTempRelations(Oid tempNamespaceId)
static void recomputeNamespacePath(void)
FuncCandidateList FuncnameGetCandidates(List *names, int nargs, List *argnames, bool expand_variadic, bool expand_defaults, bool include_out_arguments, bool missing_ok, int *fgc_flags)
static Oid myTempNamespace
#define SPCACHE_RESET_THRESHOLD
bool SearchPathMatchesCurrentEnvironment(SearchPathMatcher *path)
Datum pg_statistics_obj_is_visible(PG_FUNCTION_ARGS)
static nsphash_hash * SearchPathCache
static bool ConversionIsVisibleExt(Oid conid, bool *is_missing)
static bool activeTempCreationPending
Oid get_conversion_oid(List *conname, bool missing_ok)
static void InitTempTableNamespace(void)
bool FunctionIsVisible(Oid funcid)
Oid get_ts_dict_oid(List *names, bool missing_ok)
static bool OperatorIsVisibleExt(Oid oprid, bool *is_missing)
Oid get_ts_parser_oid(List *names, bool missing_ok)
Datum pg_ts_template_is_visible(PG_FUNCTION_ARGS)
static bool TSConfigIsVisibleExt(Oid cfgid, bool *is_missing)
static bool TypeIsVisibleExt(Oid typid, bool *is_missing)
SearchPathMatcher * CopySearchPathMatcher(SearchPathMatcher *path)
static void AccessTempTableNamespace(bool force)
void SetTempNamespaceState(Oid tempNamespaceId, Oid tempToastNamespaceId)
static void InvalidationCallback(Datum arg, int cacheid, uint32 hashvalue)
Oid GetTempToastNamespace(void)
static bool OpfamilyIsVisibleExt(Oid opfid, bool *is_missing)
Oid OpfamilynameGetOpfid(Oid amid, const char *opfname)
RangeVar * makeRangeVarFromNameList(const List *names)
void AtEOXact_Namespace(bool isCommit, bool parallel)
Oid get_ts_config_oid(List *names, bool missing_ok)
static bool spcachekey_equal(SearchPathCacheKey a, SearchPathCacheKey b)
bool check_search_path(char **newval, void **extra, GucSource source)
Oid LookupNamespaceNoError(const char *nspname)
struct SearchPathCacheKey SearchPathCacheKey
ProcNumber GetTempNamespaceProcNumber(Oid namespaceId)
static void RemoveTempRelationsCallback(int code, Datum arg)
Oid TypenameGetTypid(const char *typname)
int fetch_search_path_array(Oid *sarray, int sarray_len)
Oid RangeVarGetRelidExtended(const RangeVar *relation, LOCKMODE lockmode, uint32 flags, RangeVarGetRelidCallback callback, void *callback_arg)
struct SearchPathCacheEntry SearchPathCacheEntry
static uint32 spcachekey_hash(SearchPathCacheKey key)
static uint64 activePathGeneration
bool TSConfigIsVisible(Oid cfgid)
bool StatisticsObjIsVisible(Oid stxid)
Datum pg_ts_dict_is_visible(PG_FUNCTION_ARGS)
Oid RelnameGetRelid(const char *relname)
static List * baseSearchPath
Datum pg_my_temp_schema(PG_FUNCTION_ARGS)
Datum pg_ts_parser_is_visible(PG_FUNCTION_ARGS)
bool TSDictionaryIsVisible(Oid dictId)
Datum pg_table_is_visible(PG_FUNCTION_ARGS)
bool isTempToastNamespace(Oid namespaceId)
Oid get_ts_template_oid(List *names, bool missing_ok)
void(* RangeVarGetRelidCallback)(const RangeVar *relation, Oid relId, Oid oldRelId, void *callback_arg)
#define FGC_ARGNAMES_VALID
#define FGC_ARGNAMES_MATCH
@ TEMP_NAMESPACE_NOT_TEMP
#define FGC_ARGCOUNT_MATCH
struct _FuncCandidateList * FuncCandidateList
#define FGC_SCHEMA_EXISTS
#define FGC_ARGNAMES_NONDUP
#define IsA(nodeptr, _type_)
object_access_hook_type object_access_hook
#define InvokeNamespaceSearchHook(objectId, ereport_on_violation)
ObjectType get_relkind_objtype(char relkind)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
FormData_pg_authid * Form_pg_authid
FormData_pg_class * Form_pg_class
FormData_pg_collation * Form_pg_collation
Oid FindDefaultConversion(Oid name_space, int32 for_encoding, int32 to_encoding)
FormData_pg_conversion * Form_pg_conversion
static int list_length(const List *l)
#define list_make1_oid(x1)
static ListCell * list_head(const List *l)
static ListCell * lnext(const List *l, const ListCell *c)
Oid NamespaceCreate(const char *nspName, Oid ownerId, bool isTemp)
FormData_pg_opclass * Form_pg_opclass
FormData_pg_operator * Form_pg_operator
FormData_pg_opfamily * Form_pg_opfamily
FormData_pg_proc * Form_pg_proc
static rewind_source * source
FormData_pg_statistic_ext * Form_pg_statistic_ext
FormData_pg_ts_config * Form_pg_ts_config
FormData_pg_ts_dict * Form_pg_ts_dict
FormData_pg_ts_parser * Form_pg_ts_parser
FormData_pg_ts_template * Form_pg_ts_template
FormData_pg_type * Form_pg_type
#define ERRCODE_UNDEFINED_TABLE
static Datum PointerGetDatum(const void *X)
static Datum ObjectIdGetDatum(Oid X)
static Datum CStringGetDatum(const char *X)
static Datum Int32GetDatum(int32 X)
PGPROC * ProcNumberGetProc(ProcNumber procNumber)
#define INVALID_PROC_NUMBER
const char * quote_identifier(const char *ident)
uint64 SharedInvalidMessageCounter
Snapshot GetTransactionSnapshot(void)
void PushActiveSnapshot(Snapshot snapshot)
void PopActiveSnapshot(void)
void appendStringInfoString(StringInfo str, const char *s)
void appendStringInfoChar(StringInfo str, char ch)
void initStringInfo(StringInfo str)
struct _FuncCandidateList * next
Oid args[FLEXIBLE_ARRAY_MEMBER]
CatCTup * members[FLEXIBLE_ARRAY_MEMBER]
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
HeapTuple SearchSysCache3(int cacheId, Datum key1, Datum key2, Datum key3)
Datum SysCacheGetAttr(int cacheId, HeapTuple tup, AttrNumber attributeNumber, bool *isNull)
HeapTuple SearchSysCache4(int cacheId, Datum key1, Datum key2, Datum key3, Datum key4)
#define SearchSysCacheList3(cacheId, key1, key2, key3)
#define ReleaseSysCacheList(x)
#define SearchSysCacheExists2(cacheId, key1, key2)
#define SearchSysCacheList1(cacheId, key1)
#define GetSysCacheOid3(cacheId, oidcol, key1, key2, key3)
#define GetSysCacheOid1(cacheId, oidcol, key1)
#define GetSysCacheOid2(cacheId, oidcol, key1, key2)
static void callback(struct sockaddr *addr, struct sockaddr *mask, void *unused)
String * makeString(char *str)
bool SplitIdentifierString(char *rawstring, char separator, List **namelist)
SubTransactionId GetCurrentSubTransactionId(void)
void CommandCounterIncrement(void)
void StartTransactionCommand(void)
void CommitTransactionCommand(void)
void AbortOutOfAnyTransaction(void)
#define XACT_FLAGS_ACCESSEDTEMPNAMESPACE
bool RecoveryInProgress(void)