mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Allow CREATE TABLE IF EXIST so succeed if the schema is nonexistent
Previously, CREATE TABLE IF EXIST threw an error if the schema was nonexistent. This was done by passing 'missing_ok' to the function that looks up the schema oid.
This commit is contained in:
@ -1027,7 +1027,7 @@ make_oper_cache_key(OprCacheKey *key, List *opname, Oid ltypeId, Oid rtypeId)
|
||||
if (schemaname)
|
||||
{
|
||||
/* search only in exact schema given */
|
||||
key->search_path[0] = LookupExplicitNamespace(schemaname);
|
||||
key->search_path[0] = LookupExplicitNamespace(schemaname, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -149,7 +149,7 @@ LookupTypeName(ParseState *pstate, const TypeName *typeName,
|
||||
/* Look in specific schema only */
|
||||
Oid namespaceId;
|
||||
|
||||
namespaceId = LookupExplicitNamespace(schemaname);
|
||||
namespaceId = LookupExplicitNamespace(schemaname, false);
|
||||
typoid = GetSysCacheOid2(TYPENAMENSP,
|
||||
PointerGetDatum(typname),
|
||||
ObjectIdGetDatum(namespaceId));
|
||||
|
Reference in New Issue
Block a user