Re: superuser() shortcuts

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Adam Brightwell <adam(dot)brightwell(at)crunchydatasolutions(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: superuser() shortcuts
Date: 2014-11-26 15:12:10
Message-ID: 20141126151210.GY28859@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> In the context at hand, I think most of the messages in question are
> currently phrased like "must be superuser to do X". I'd be fine with
> changing that to "permission denied to do X", but not to just
> "permission denied".

Apologies for the terseness of my (earlier) reply. This is exactly what
I'm suggesting. What was in the patch was this change:

! ERROR: must be superuser or replication role to use replication slots

---

! ERROR: permission denied to use replication slots
! HINT: You must be superuser or replication role to use replication slots.

On reflection, perhaps it should be an errdetail() message instead of an
errhint() message, but the complaint levied against the change was
making it be 'permission denied to X' and moving the 'must be superuser'
out of the errmsg().

Thanks!

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-11-26 15:14:01 Re: superuser() shortcuts
Previous Message Palle Girgensohn 2014-11-26 15:10:32 Re: [pgsql-packagers] Palle Girgensohn's ICU patch