Inconsistency in ACL error message

From: Joseph Koshakow <koshy44(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Inconsistency in ACL error message
Date: 2023-02-24 17:23:27
Message-ID: CAAvxfHfJuAaKXVTQ7e3EdDko=qyEh-GwgZe_RqzK9MWgcxp9Xw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

I noticed a very minor inconsistency in some ACL error messages. When
you are try and alter a role, it just says "permission denied":

postgres=> ALTER ROLE bar NOCREATEDB;
ERROR: permission denied
postgres=> ALTER ROLE bar SET search_path TO 'foo';
ERROR: permission denied

For almost all other ACL error, we include what the action was. For
example:

postgres=> CREATE ROLE r;
ERROR: permission denied to create role
postgres=> DROP ROLE postgres;
ERROR: permission denied to drop role
postgres=> CREATE DATABASE foo;
ERROR: permission denied to create database

It's not a huge deal, but it's easy enough to fix that I thought I'd
generate a patch (attached). Let me know if people think that it's
worth merging.

- Joe Koshakow

Attachment Content-Type Size
v1-0001-Add-details-to-ALTER-ROLE-permission-errors.patch text/x-patch 1.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthias van de Meent 2023-02-24 18:03:45 Re: PATCH: Using BRIN indexes for sorted output
Previous Message Sébastien Lardière 2023-02-24 16:27:21 Re: Timeline ID hexadecimal format