MCPcopy Create free account
hub / github.com/apache/cloudberry / LookupNamespaceNoError

Function LookupNamespaceNoError

src/backend/catalog/namespace.c:2939–2960  ·  view source on GitHub ↗

* LookupNamespaceNoError * Look up a schema name. * * Returns the namespace OID, or InvalidOid if not found. * * Note this does NOT perform any permissions check --- callers are * responsible for being sure that an appropriate check is made. * In the majority of cases LookupExplicitNamespace is preferable. */

Source from the content-addressed store, hash-verified

2937 * In the majority of cases LookupExplicitNamespace is preferable.
2938 */
2939Oid
2940LookupNamespaceNoError(const char *nspname)
2941{
2942 /* check for pg_temp alias */
2943 if (strcmp(nspname, "pg_temp") == 0)
2944 {
2945 if (OidIsValid(myTempNamespace))
2946 {
2947 InvokeNamespaceSearchHook(myTempNamespace, true);
2948 return myTempNamespace;
2949 }
2950
2951 /*
2952 * Since this is used only for looking up existing objects, there is
2953 * no point in trying to initialize the temp namespace here; and doing
2954 * so might create problems for some callers. Just report "not found".
2955 */
2956 return InvalidOid;
2957 }
2958
2959 return get_namespace_oid(nspname, true);
2960}
2961
2962/*
2963 * LookupExplicitNamespace

Callers 3

DropErrorMsgNonExistentFunction · 0.85
refnameNamespaceItemFunction · 0.85

Calls 1

get_namespace_oidFunction · 0.85

Tested by

no test coverage detected