Skip site navigation (1) Skip section navigation (2)

pgsql: Improve reporting of permission errors for array types

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve reporting of permission errors for array types
Date: 2012-06-15 21:38:02
Message-ID: E1SfeDS-0000wo-4i@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Improve reporting of permission errors for array types

Because permissions are assigned to element types, not array types,
complaining about permission denied on an array type would be
misleading to users.  So adjust the reporting to refer to the element
type instead.

In order not to duplicate the required logic in two dozen places,
refactor the permission denied reporting for types a bit.

pointed out by Yeb Havinga during the review of the type privilege
feature

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/0b847cba696b0426694e5f48aa95455269624e87

Modified Files
--------------
src/backend/access/common/tupdesc.c      |    3 +--
src/backend/catalog/aclchk.c             |   13 +++++++++++++
src/backend/catalog/objectaddress.c      |    3 +--
src/backend/catalog/pg_aggregate.c       |    9 +++------
src/backend/commands/functioncmds.c      |   12 ++++--------
src/backend/commands/opclasscmds.c       |    6 ++----
src/backend/commands/operatorcmds.c      |    9 +++------
src/backend/commands/tablecmds.c         |    9 +++------
src/backend/commands/typecmds.c          |   18 ++++++------------
src/include/utils/acl.h                  |    2 ++
src/test/regress/expected/privileges.out |    2 +-
11 files changed, 39 insertions(+), 47 deletions(-)

pgsql-committers by date

Next:From: Bruce MomjianDate: 2012-06-15 23:57:15
Subject: pgsql: Improve pg_upgrade wording for pg_ctl start failure; could be
Previous:From: Heikki LinnakangasDate: 2012-06-15 15:14:02
Subject: Re: [COMMITTERS] pgsql: New SQL functons pg_backup_in_progress() and pg_backup_start_tim

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group