1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-27 23:21:58 +03:00

Adjust 'permission denied' messages to be more useful and consistent.

This commit is contained in:
Tom Lane
2003-08-01 00:15:26 +00:00
parent a063d4b3ec
commit c4cf7fb814
38 changed files with 377 additions and 243 deletions

View File

@ -26,7 +26,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.211 2003/07/28 00:09:14 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.212 2003/08/01 00:15:20 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -387,7 +387,8 @@ ExecCheckRTEPerms(RangeTblEntry *rte, CmdType operation)
{
aclcheck_result = CHECK(ACL_SELECT);
if (aclcheck_result != ACLCHECK_OK)
aclcheck_error(aclcheck_result, get_rel_name(relOid));
aclcheck_error(aclcheck_result, ACL_KIND_CLASS,
get_rel_name(relOid));
}
if (rte->checkForWrite)
@ -416,7 +417,8 @@ ExecCheckRTEPerms(RangeTblEntry *rte, CmdType operation)
break;
}
if (aclcheck_result != ACLCHECK_OK)
aclcheck_error(aclcheck_result, get_rel_name(relOid));
aclcheck_error(aclcheck_result, ACL_KIND_CLASS,
get_rel_name(relOid));
}
}
@ -774,7 +776,8 @@ InitPlan(QueryDesc *queryDesc, bool explainOnly)
aclresult = pg_namespace_aclcheck(namespaceId, GetUserId(),
ACL_CREATE);
if (aclresult != ACLCHECK_OK)
aclcheck_error(aclresult, get_namespace_name(namespaceId));
aclcheck_error(aclresult, ACL_KIND_NAMESPACE,
get_namespace_name(namespaceId));
/*
* have to copy tupType to get rid of constraints