pgsql: Improve error message annotation for GRANT/REVOKE on untrusted P

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve error message annotation for GRANT/REVOKE on untrusted P
Date: 2016-06-18 23:39:07
Message-ID: E1bEPpT-00023o-1G@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve error message annotation for GRANT/REVOKE on untrusted PLs.

The annotation for "ERROR: language "foo" is not trusted" used to say
"HINT: Only superusers can use untrusted languages", which was fairly
poorly thought out. For one thing, it's not a hint about what to do,
but a statement of fact, which makes it errdetail. But also, this
fails to clarify things much, because there's a missing step in the
chain of reasoning. I think it's more useful to say "GRANT and REVOKE
are not allowed on untrusted languages, because only superusers can use
untrusted languages".

It's been like this for a long time, but given the lack of previous
complaints, I don't think this is worth back-patching.

Discussion: <1417(dot)1466289901(at)sss(dot)pgh(dot)pa(dot)us>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/9bc3332372f9992875d80f856fd98999e070fe35

Modified Files
--------------
src/backend/catalog/aclchk.c | 3 ++-
src/test/regress/expected/privileges.out | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-06-19 17:12:22 pgsql: Docs: improve description of psql's %R prompt escape sequence.
Previous Message Tom Lane 2016-06-18 22:05:33 pgsql: Update 9.6 release notes through today.