*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.73 2002/08/05 03:29:16 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.74 2002/08/07 21:45:01 tgl Exp $
*
* NOTES
* See acl.h.
bool isNull;
Acl *acl;
+ /*
+ * If we have been assigned this namespace as a temp namespace,
+ * assume we have all grantable privileges on it.
+ */
+ if (isTempNamespace(nsp_oid))
+ return ACLCHECK_OK;
+
/* Superusers bypass all permission checking. */
if (superuser_arg(userid))
return ACLCHECK_OK;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.80 2002/08/02 18:15:06 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.81 2002/08/07 21:45:01 tgl Exp $
*
*-------------------------------------------------------------------------
*/
* Verify we (still) have CREATE rights in the rel's namespace.
* (Presumably we did when the rel was created, but maybe not anymore.)
* Skip check if bootstrapping, since permissions machinery may not
- * be working yet; also, always allow if it's a temp table.
+ * be working yet.
*/
- if (!IsBootstrapProcessingMode() && !isTempNamespace(namespaceId))
+ if (!IsBootstrapProcessingMode())
{
AclResult aclresult;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.27 2002/08/05 03:29:17 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.28 2002/08/07 21:45:01 tgl Exp $
*
*-------------------------------------------------------------------------
*/
* Look up the namespace in which we are supposed to create the
* relation. Check we have permission to create there.
* Skip check if bootstrapping, since permissions machinery may not
- * be working yet; also, always allow if it's a temp table.
+ * be working yet.
*/
namespaceId = RangeVarGetCreationNamespace(stmt->relation);
- if (!IsBootstrapProcessingMode() && !isTempNamespace(namespaceId))
+ if (!IsBootstrapProcessingMode())
{
AclResult aclresult;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.172 2002/08/04 05:04:39 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.173 2002/08/07 21:45:02 tgl Exp $
*
*-------------------------------------------------------------------------
*/
{
char *intoName;
Oid namespaceId;
+ AclResult aclresult;
Oid intoRelationId;
TupleDesc tupdesc;
intoName = parseTree->into->relname;
namespaceId = RangeVarGetCreationNamespace(parseTree->into);
- 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 = pg_namespace_aclcheck(namespaceId, GetUserId(),
+ ACL_CREATE);
+ if (aclresult != ACLCHECK_OK)
+ aclcheck_error(aclresult,
+ get_namespace_name(namespaceId));
/*
* new "INTO" table is created WITH OIDS
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
/*
* 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;