diff options
author | Michael Paquier <michael@paquier.xyz> | 2020-01-08 10:36:12 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2020-01-08 10:36:12 +0900 |
commit | 65192e02441cedd106b6abebe0036fb8cc124fb3 (patch) | |
tree | ff82399244deaa36fb514cee7bdb61f29a7a2fa9 /src/backend/commands/dropcmds.c | |
parent | b0b6196386681383b8f0cb76df4fd35178a7371e (diff) | |
download | postgresql-65192e02441cedd106b6abebe0036fb8cc124fb3.tar.gz postgresql-65192e02441cedd106b6abebe0036fb8cc124fb3.zip |
Revert "Forbid DROP SCHEMA on temporary namespaces"
This reverts commit a052f6c, following complains from Robert Haas and
Tom Lane. Backpatch down to 9.4, like the previous commit.
Discussion: https://postgr.es/m/CA+TgmobL4npEX5=E5h=5Jm_9mZun3MT39Kq2suJFVeamc9skSQ@mail.gmail.com
Backpatch-through: 9.4
Diffstat (limited to 'src/backend/commands/dropcmds.c')
-rw-r--r-- | src/backend/commands/dropcmds.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/backend/commands/dropcmds.c b/src/backend/commands/dropcmds.c index e7891a44187..b3131ab208c 100644 --- a/src/backend/commands/dropcmds.c +++ b/src/backend/commands/dropcmds.c @@ -101,21 +101,6 @@ RemoveObjects(DropStmt *stmt) errhint("Use DROP AGGREGATE to drop aggregate functions."))); } - /* - * Prevent the drop of a temporary schema, be it owned by the current - * session or another backend as this would mess up with the callback - * registered to clean up temporary objects at the end of a session. - * Note also that the creation of any follow-up temporary object would - * result in inconsistencies within the session whose temporary schema - * has been dropped. - */ - if (stmt->removeType == OBJECT_SCHEMA && - isAnyTempNamespace(address.objectId)) - ereport(ERROR, - (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("cannot drop temporary schema \"%s\"", - get_namespace_name(address.objectId)))); - /* Check permissions. */ namespaceId = get_object_namespace(&address); if (!OidIsValid(namespaceId) || |