diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/catalog/namespace.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c index ce795a61c5b..1756bbd5f4b 100644 --- a/src/backend/catalog/namespace.c +++ b/src/backend/catalog/namespace.c @@ -414,9 +414,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"))); } } |