Re: [PATCH] psql: add \dcs to list all constraints - Mailing list pgsql-hackers

From Tatsuro Yamada
Subject Re: [PATCH] psql: add \dcs to list all constraints
Date
Msg-id CAOKkKFvdhCXT8MSiwArCynJwGbRbuxJpXoLDT+0ggTj89i-hxA@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] psql: add \dcs to list all constraints  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] psql: add \dcs to list all constraints
List pgsql-hackers
Hi Tom,

On Thu, Jan 15, 2026 at 12:59 PM Tom Lane <tgl@sss.pgh.pa.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
 
 

pgsql-hackers by date:

Previous
From: Kirill Reshke
Date:
Subject: Re: Parallel CREATE INDEX for GIN indexes
Next
From: Laurenz Albe
Date:
Subject: Re: Can we change pg_rewind used without wal_log_hints and data_checksums