]> granicus.if.org Git - postgresql/blobdiff - src/backend/catalog/namespace.c
Unbreak unlogged tables.
[postgresql] / src / backend / catalog / namespace.c
index dec608c9076d8bf4b4f1dba370a897549497e3f5..2386a894356939de55064f349e93d6cb1b2bf79b 100644 (file)
@@ -506,9 +506,10 @@ RangeVarAdjustRelationPersistence(RangeVar *newRelation, Oid nspid)
                                                 errmsg("cannot create relations in temporary schemas of other sessions")));
                        break;
                default:
-                       ereport(ERROR,
-                                       (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
-                                        errmsg("only temporary relations may be created in temporary schemas")));
+                       if (isAnyTempNamespace(nspid))
+                               ereport(ERROR,
+                                               (errcode(ERRCODE_INVALID_TABLE_DEFINITION),
+                                                errmsg("only temporary relations may be created in temporary schemas")));
        }
 }