diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-04-27 03:45:03 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-04-27 03:45:03 +0000 |
commit | 31c775adeb2251a9c66328cbc9016877e5e4f085 (patch) | |
tree | 065014ccecaae449f8a1c977319e823d54364c4b /src/backend/commands/lockcmds.c | |
parent | aafe72efb2d9a01db77bacf94b9b103042b5eb60 (diff) | |
download | postgresql-31c775adeb2251a9c66328cbc9016877e5e4f085.tar.gz postgresql-31c775adeb2251a9c66328cbc9016877e5e4f085.zip |
Restructure aclcheck error reporting to make permission-failure
messages more uniform and internationalizable: the global array
aclcheck_error_strings[] is gone in favor of a subroutine
aclcheck_error(). Partial implementation of namespace-related
permission checks --- not all done yet.
Diffstat (limited to 'src/backend/commands/lockcmds.c')
-rw-r--r-- | src/backend/commands/lockcmds.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/commands/lockcmds.c b/src/backend/commands/lockcmds.c index c91669572ef..80e42e3aa13 100644 --- a/src/backend/commands/lockcmds.c +++ b/src/backend/commands/lockcmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/lockcmds.c,v 1.1 2002/04/15 05:22:03 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/lockcmds.c,v 1.2 2002/04/27 03:45:01 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -19,6 +19,7 @@ #include "commands/lockcmds.h" #include "miscadmin.h" #include "utils/acl.h" +#include "utils/lsyscache.h" /* @@ -38,7 +39,7 @@ LockTableCommand(LockStmt *lockstmt) { RangeVar *relation = lfirst(p); Oid reloid; - int32 aclresult; + AclResult aclresult; Relation rel; /* @@ -55,7 +56,7 @@ LockTableCommand(LockStmt *lockstmt) ACL_UPDATE | ACL_DELETE); if (aclresult != ACLCHECK_OK) - elog(ERROR, "LOCK TABLE: permission denied"); + aclcheck_error(aclresult, get_rel_name(reloid)); rel = relation_open(reloid, lockstmt->mode); |