Re: Fix wrong error message from pg_get_tablespace_ddl() - Mailing list pgsql-hackers

From Jim Jones
Subject Re: Fix wrong error message from pg_get_tablespace_ddl()
Date
Msg-id edcd87ec-e91d-44f8-a8a3-d19c786b2712@uni-muenster.de
Whole thread
In response to Re: Fix wrong error message from pg_get_tablespace_ddl()  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On 08/05/2026 14:07, Andrew Dunstan wrote:
> I'm not 100% convinced these are in fact wrong. The user asks for the 
> DDL for a named role or tablespace and we tell them that they don't have 
> the privilege to get the information for that object. If we tell them 
> that the problem is that they don't have privilege on the underlying 
> catalog table, they might think "Well, I didn't ask for that".

I honestly don't have a strong opinion either way.

It depends on what we expect from the error message. If its purpose is 
simply to tell the user "you can't access this object," the current 
message is totally fine. If, however, the goal is to show the error's 
root cause, it could be a bit misleading.

Best, Jim




pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: Proposal: Conflict log history table for Logical Replication
Next
From: Amit Kapila
Date:
Subject: Re: Adding REPACK [concurrently]