From: | "Brightwell, Adam" <adam(dot)brightwell(at)crunchydatasolutions(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Stephen Frost <sfrost(at)snowman(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: superuser() shortcuts |
Date: | 2014-10-23 19:52:18 |
Message-ID: | CAKRt6CSM_OYf5L8mJk7Ath+iCMwfp2OvbrftgQmLdzNXvhrTjw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>> I noticed something strange while perusing this patch, but the issue
>> predates the patch. Some messages say "must be superuser or replication
>> role to foo", but our longstanding practice is to say "permission denied
>> to foo". Why do we have this inconsistency? Should we remove it? If
>> we do want to keep the old wording this patch should use "permission
>> denied to" in the places that it touches.
>
> If we were to make it consistent and use the old wording, what do you
> think about providing an "errhint" as well?
>
> Perhaps for example in slotfuncs.c#pg_create_physical_replication_stot:
>
> errmsg - "permission denied to create physical replication slot"
> errhint - "You must be superuser or replication role to use replication slots."
As I started looking at this, there are multiple other places where
these types of error messages occur (opclasscmds.c, user.c,
postinit.c, miscinit.c are just a few), not just around the changes in
this patch. If we change them in one place, wouldn't it be best to
change them in the rest? If that is the case, I'm afraid that might
distract from the purpose of this patch. Perhaps, if we want to
change them, then that should be submitted as a separate patch?
-Adam
--
Adam Brightwell - adam(dot)brightwell(at)crunchydatasolutions(dot)com
Database Engineer - www.crunchydatasolutions.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-10-23 19:54:47 | Re: ltree::text not immutable? |
Previous Message | Tom Lane | 2014-10-23 19:31:44 | Re: ltree::text not immutable? |