Re: Adding error messages to a few slash commands

From: Abhishek Chanda <abhishek(dot)becs(at)gmail(dot)com>
To: Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Adding error messages to a few slash commands
Date: 2025-04-13 16:40:29
Message-ID: CAKiP-K-QgovuxqunKJHHmL+i7px2Jc30gX8-rvAj7ug9E1f7zw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks for the feedback, attached an updated patch that changes most
of those "Did not find" messages to empty tables. I did not change two
sets, listDbRoleSettings and listTables both have comments describing
that these are deliberately this way.

I wanted to post this update to close this loop for now. I will follow
up once the merge window opens again.

Thanks

On Sun, Apr 13, 2025 at 1:47 AM Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru> wrote:
>
> On 13.04.2025 08:29, Tom Lane wrote:
>
> Abhishek Chanda <abhishek(dot)becs(at)gmail(dot)com> writes:
>
> Currently, some slash commands in psql return an error saying "Did not
> find any XXXX named YYYY" while some return an empty table. This patch
> changes a few of the slash commands to return a similar error message.
>
>
> +1 for this patch.
>
> Personally, if I were trying to make these things consistent, I'd have
> gone in the other direction (ie return empty tables).
>
>
> +1
> Returning empty tables is a more appropriate behavior.
>
> --
> Pavel Luzanov
> Postgres Professional: https://postgrespro.com

--
Thanks and regards
Abhishek Chanda

Attachment Content-Type Size
v2-0001-Print-empty-table-when-a-given-object-is-not-foun.patch application/octet-stream 3.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Wolfgang Walther 2025-04-13 17:27:33 Re: Buildfarm: Enabling injection points on basilisk/dogfish (Alpine / musl)
Previous Message Tom Lane 2025-04-13 15:51:57 Re: Back-patch of: avoid multiple hard links to same WAL file after a crash