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

From Chao Li
Subject Re: [PATCH] psql: add \dcs to list all constraints
Date
Msg-id AE74F853-3CCC-4171-BB93-6196598E06EC@gmail.com
Whole thread Raw
In response to Re: [PATCH] psql: add \dcs to list all constraints  (Chao Li <li.evan.chao@gmail.com>)
List pgsql-hackers

> On Jan 15, 2026, at 17:53, Chao Li <li.evan.chao@gmail.com> wrote:
>
>
>
>> On Jan 15, 2026, at 17:20, Tatsuro Yamada <yamatattsu@gmail.com> wrote:
>>
>> Hi Chao-san,
>>
>> Thanks for your comments!
>>
>> On Thu, Jan 15, 2026 at 4:20 PM Chao Li <li.evan.chao@gmail.com> wrote:
>>
>>> 3
>>> ```
>>> ---- \dCN doesn't show constraints related to domain,
>>> ---- since \dD can be used to check them
>>> ```
>>>
>>> I saw this in the test script, should we mention that in the doc change?
>>
>> Tom also commented on constraints related to domains, and I would like to
>> discuss and decide whether to include them in the \dCN command.
>>
>> Depending on the decision, I am considering the following changes:
>>
>> - If they are included:
>>    - Remove the above test case from the regression tests
>> - If they are not included:
>>    - Add the reason for excluding them to the documentation
>>
>> Which do you think is better? Should domain constraints be covered by \dCN?
>> I would appreciate your feedback.
>
> I had a feeling while reviewing the patch but I didn’t raise it because I was not firm minded. As you ask, this is
justmy personal opinion, you may ignore if you don’t consider reasonable. 
>
> This patch claims “constraints”, but it actually only shows table constraints. How, we can see the code comment says
"Describesconstraints”, the command message says "List of constraints”, I think that’s where the discussion came from. 
>
> Maybe an easy way to go is something like renaming the command to \dTCN, making it specific to table constraints.

I just want to add that, I am not sure if “table constraints” is a proper group, and I didn’t intend to suggest a new
commandname as \dTCN. My point was to make the feature scope more specific, and make the command name better reflect to
thescope. 

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/







pgsql-hackers by date:

Previous
From: Álvaro Herrera
Date:
Subject: Re: remove the unneeded header file math.h in binaryheap.c
Next
From: Peter Eisentraut
Date:
Subject: Re: PL/Python initialization cleanup