diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-08-01 00:15:26 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-08-01 00:15:26 +0000 |
commit | c4cf7fb8146d89293c6667d1fcc295c45da52713 (patch) | |
tree | 80526e9728d4a325b79e7d6a76551204605673fa /src/backend/commands/indexcmds.c | |
parent | a063d4b3ec5d74dad4cf65cdd1dd90e88c968d44 (diff) | |
download | postgresql-c4cf7fb8146d89293c6667d1fcc295c45da52713.tar.gz postgresql-c4cf7fb8146d89293c6667d1fcc295c45da52713.zip |
Adjust 'permission denied' messages to be more useful and consistent.
Diffstat (limited to 'src/backend/commands/indexcmds.c')
-rw-r--r-- | src/backend/commands/indexcmds.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index 0f6a9e28f0d..4cd66fd1b5d 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.102 2003/07/20 21:56:32 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.103 2003/08/01 00:15:19 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -135,7 +135,8 @@ DefineIndex(RangeVar *heapRelation, 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)); } /* @@ -621,13 +622,13 @@ ReindexIndex(RangeVar *indexRelation, bool force /* currently unused */ ) if (!allowSystemTableMods) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("\"%s\" is a system index", + errmsg("permission denied: \"%s\" is a system index", indexRelation->relname), errhint("Do REINDEX in standalone postgres with -O -P options."))); if (!IsIgnoringSystemIndexes()) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("\"%s\" is a system index", + errmsg("permission denied: \"%s\" is a system index", indexRelation->relname), errhint("Do REINDEX in standalone postgres with -P -O options."))); } @@ -710,9 +711,8 @@ ReindexDatabase(const char *dbname, bool force, bool all) errmsg("can only reindex the currently open database"))); if (!pg_database_ownercheck(MyDatabaseId, GetUserId())) - ereport(ERROR, - (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("permission denied"))); + aclcheck_error(ACLCHECK_NOT_OWNER, ACL_KIND_DATABASE, + dbname); if (!allowSystemTableMods) ereport(ERROR, |