diff options
| author | Tom Lane | 2002-08-07 21:45:02 +0000 |
|---|---|---|
| committer | Tom Lane | 2002-08-07 21:45:02 +0000 |
| commit | c1003339d6899535b455951b875565e5e73f2f7d (patch) | |
| tree | a004eca76524fa088983a6c0bbd947335105cfff /src/backend/tcop | |
| parent | dfef56a92f234b1a750c4eb7c488438eb5d7bc0f (diff) | |
Fix permission checking for temp-table namespace.
Diffstat (limited to 'src/backend/tcop')
| -rw-r--r-- | src/backend/tcop/utility.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 8c3af9ac9ce..2ef3ff8a3f4 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.168 2002/08/04 04:31:44 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.169 2002/08/07 21:45:02 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -399,22 +399,17 @@ ProcessUtility(Node *parsetree, /* * RENAME TABLE requires that we (still) hold CREATE * rights on the containing namespace, as well as - * ownership of the table. But skip check for - * temp tables. + * ownership of the table. */ Oid namespaceId = get_rel_namespace(relid); - - if (!isTempNamespace(namespaceId)) - { - AclResult aclresult; - - aclresult = pg_namespace_aclcheck(namespaceId, - GetUserId(), - ACL_CREATE); - if (aclresult != ACLCHECK_OK) - aclcheck_error(aclresult, - get_namespace_name(namespaceId)); - } + AclResult aclresult; + + aclresult = pg_namespace_aclcheck(namespaceId, + GetUserId(), + ACL_CREATE); + if (aclresult != ACLCHECK_OK) + aclcheck_error(aclresult, + get_namespace_name(namespaceId)); renamerel(relid, stmt->newname); break; |
