Re: Add psql command to list constraints - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Add psql command to list constraints
Date
Msg-id CAKFQuwYLRJ-Oatk2CXETAA1XSV9d9de60pkntVtQrGougWFJaQ@mail.gmail.com
Whole thread Raw
In response to Re: Add psql command to list constraints  (Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>)
Responses Re: Add psql command to list constraints
Re: Add psql command to list constraints
List pgsql-hackers
On Mon, Nov 15, 2021 at 5:23 PM Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp> wrote:

> I'm not confident that if I would use this, so let's wait to see if someone
> else wants to give a +1.

Okay, but you agree that there are DBAs and users who want to see the
list of constraints, I think.

My opinion is this doesn't exist because there isn't any demand for it.  
 
For example, it will be easier to understand how many foreign key
constraints are in the DB.

That isn't a very compelling metric.  Metrics also don't seem to be the primary motivation for the psql \d commands.  I envision them mostly useful when writing a query and wanting a query refresher as to what is valid/available.  In that context looking at constraints in the context of a single table makes sense.  Looking at all constraints is considerably less so.  Especially since constraints mostly impact insert queries and those only affect a single table.

If the only motivation for this is "feature completion" - since we have so many other \d commands already implemented - I say we should pass.

David J.

pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: Add psql command to list constraints
Next
From: Bharath Rupireddy
Date:
Subject: Re: Logical Replication - improve error message while adding tables to the publication in check_publication_add_relation