Re: [PATCH] psql: add \dcs to list all constraints

From: Tatsuro Yamada <yamatattsu(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Subject: Re: [PATCH] psql: add \dcs to list all constraints
Date: 2026-01-15 05:12:23
Message-ID: CAOKkKFvdhCXT8MSiwArCynJwGbRbuxJpXoLDT+0ggTj89i-hxA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Tom,

On Thu, Jan 15, 2026 at 12:59 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
I wrote:
>> * You might do well to use upper-case letters for add-on
>> filters (that is, "N" not "n" for not-null, etc). This isn't
>> really a convention we've used elsewhere, except for the case
>> of "S" for "system" in some commands. But I think it's too
>> hard to tell the base command name from the filter add-ons
>> without some typographic help like that.
>
>Or we could invert that: make the base command name "\dCN"
>and then the add-on filters stay lower case. Since we
>already have, eg, "\dC", this might be less of a departure
>from existing practice.

That sounds like a good idea.
Keeping the add-on filters in lowercase will help maintain
consistency with other commands.
Therefore, I will change the command name to the one you suggested.

The next patch will include the following changes:

- Rename the command from \dcs to \dCN (proposed by Tom. Thanks!)
- Join pg_class in the query only when the "+" option is used
(identified through Jim's additional testing. Thanks!)

Note: The following two points, which were discussed in the previous email,
will be addressed once the discussion is settled:

- Changing the column order displayed by the \dCN command
- Adding domain constraints to the list of displayed items

Thanks,
Tatsuro Yamada

>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Laurenz Albe 2026-01-15 05:47:35 Re: Can we change pg_rewind used without wal_log_hints and data_checksums
Previous Message Kirill Reshke 2026-01-15 05:08:37 Re: Parallel CREATE INDEX for GIN indexes