From 7e2322dff30c04d90c0602d2b5ae24b4881db88b Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sat, 26 Jan 2013 13:24:50 -0500 Subject: 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. --- src/backend/commands/opclasscmds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/commands/opclasscmds.c') diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c index 2cfd89a7f9a..95b9a738fed 100644 --- a/src/backend/commands/opclasscmds.c +++ b/src/backend/commands/opclasscmds.c @@ -103,7 +103,7 @@ OpFamilyCacheLookup(Oid amID, List *opfamilyname, bool missing_ok) /* Look in specific schema only */ Oid namespaceId; - namespaceId = LookupExplicitNamespace(schemaname); + namespaceId = LookupExplicitNamespace(schemaname, false); htup = SearchSysCache3(OPFAMILYAMNAMENSP, ObjectIdGetDatum(amID), PointerGetDatum(opfname), @@ -179,7 +179,7 @@ OpClassCacheLookup(Oid amID, List *opclassname, bool missing_ok) /* Look in specific schema only */ Oid namespaceId; - namespaceId = LookupExplicitNamespace(schemaname); + namespaceId = LookupExplicitNamespace(schemaname, false); htup = SearchSysCache3(CLAAMNAMENSP, ObjectIdGetDatum(amID), PointerGetDatum(opcname), -- cgit v1.2.3