Re: Fix wrong error message from pg_get_tablespace_ddl()

From: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix wrong error message from pg_get_tablespace_ddl()
Date: 2026-05-08 12:22:00
Message-ID: edcd87ec-e91d-44f8-a8a3-d19c786b2712@uni-muenster.de
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2026-05-08 12:25:12 Re: Adding REPACK [concurrently]
Previous Message Dilip Kumar 2026-05-08 12:09:53 Re: Proposal: Conflict log history table for Logical Replication