mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Make UPDATE and DELETE privileges distinct. Add REFERENCES and TRIGGER
privileges. INSERT and COPY FROM now require INSERT (only). Add privileges regression test.
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.110 2001/05/07 00:43:23 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.111 2001/05/27 09:59:29 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -267,7 +267,7 @@ ProcessUtility(Node *parsetree,
|
||||
int aclcheck_result;
|
||||
|
||||
relationName = RewriteGetRuleEventRel(rulename);
|
||||
aclcheck_result = pg_aclcheck(relationName, GetUserId(), ACL_RU);
|
||||
aclcheck_result = pg_aclcheck(relationName, GetUserId(), ACL_RULE);
|
||||
if (aclcheck_result != ACLCHECK_OK)
|
||||
elog(ERROR, "%s: %s", relationName,
|
||||
aclcheck_error_strings[aclcheck_result]);
|
||||
@ -550,7 +550,7 @@ ProcessUtility(Node *parsetree,
|
||||
int aclcheck_result;
|
||||
|
||||
relname = stmt->object->relname;
|
||||
aclcheck_result = pg_aclcheck(relname, GetUserId(), ACL_RU);
|
||||
aclcheck_result = pg_aclcheck(relname, GetUserId(), ACL_RULE);
|
||||
if (aclcheck_result != ACLCHECK_OK)
|
||||
elog(ERROR, "%s: %s", relname, aclcheck_error_strings[aclcheck_result]);
|
||||
set_ps_display(commandTag = "CREATE");
|
||||
|
Reference in New Issue
Block a user