Re: Add psql command to list constraints

2022-03-28 Thread Tatsuro Yamada
Hi Dag, The patch adds the command "\dco" to list constraints in psql. This seems useful to me. Thank you! The patch applies cleanly to HEAD, although some hunks have rather large offsets. As far as I can tell, the "\dco" command works as documented. I have however found the following

Re: Add psql command to list constraints

2022-03-28 Thread Tatsuro Yamada
Hi All, In the interests of trying to clean up the CF and keep things moving I'll mark the patch rejected. Thank you for managing the commitfest and the comments from many of hackers. I apologize for not being able to email you more often due to my busy day job. First of all, I understand to

Re: Add psql command to list constraints

2022-03-28 Thread Greg Stark
In the interests of trying to clean up the CF and keep things moving I'll mark the patch rejected. That doesn't mean the decision can't change or that nobody's allowed to keep discussing it. It's just that that seems to be the decision right now and there are too many patches queued up to keep

Re: Add psql command to list constraints

2022-03-25 Thread Robert Haas
On Fri, Mar 25, 2022 at 3:20 PM Justin Pryzby wrote: > \dX is similar, and I remember wondering whether it was really useful/needed. > The catalog tables are exposed and documented for a reason, and power-users > will learn to use them. I don't think that \dX is comparable, because I don't think

Re: Add psql command to list constraints

2022-03-25 Thread Justin Pryzby
On Fri, Mar 25, 2022 at 03:11:47PM -0400, Robert Haas wrote: > On Fri, Mar 25, 2022 at 12:28 AM Greg Stark wrote: > > Development of this seems to have stalled with the only review of this > > patch expressing some skepticism about whether it's needed at all. > > Now, there is some precedent for

Re: Add psql command to list constraints

2022-03-25 Thread Robert Haas
On Fri, Mar 25, 2022 at 12:28 AM Greg Stark wrote: > Development of this seems to have stalled with the only review of this > patch expressing some skepticism about whether it's needed at all. My opinion on this patch is that we typically handle objects that are essentially table properties by

Re: Add psql command to list constraints

2022-03-24 Thread Greg Stark
Development of this seems to have stalled with the only review of this patch expressing some skepticism about whether it's needed at all. Unless anyone steps forward and says it's interesting I'm going to mark it rejected? I don't actually think it's a terrible idea myself but I think every use

Re: Add psql command to list constraints

2022-02-04 Thread Dag Lem
"David G. Johnston" writes: > On Monday, November 15, 2021, Tatsuro Yamada > wrote: > > I don't know if this is a good example, but if you look at > StackOverflow, > it seems that people who want to see a list of constraints appear > regularly. > >

Add psql command to list constraints

2021-11-15 Thread David G. Johnston
On Monday, November 15, 2021, Tatsuro Yamada wrote: > > > I don't know if this is a good example, but if you look at StackOverflow, > it seems that people who want to see a list of constraints appear > regularly. https://stackoverflow.com/questions/62987794/how-to-list-all >

Re: Add psql command to list constraints

2021-11-15 Thread Tatsuro Yamada
Hi David, Thanks for your comments. 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. I don't know if this is a good example, but if you look at StackOverflow,

Re: Add psql command to list constraints

2021-11-15 Thread Tatsuro Yamada
nts). Thanks! Fixed the both. Attached file is new patch. It includes: - Fix help message s/constraint/constraints/ - s/Exclude/Exclusion/ - Remove unused modifier "+" - Add document for \dco Thanks, Tatsuro Yamada From eee92ee549e49d0b5aef438aff10236611db410e Mon Se

Re: Add psql command to list constraints

2021-11-15 Thread David G. Johnston
On Monday, November 15, 2021, David G. Johnston wrote: > > If the only motivation for this is "feature completion" - since we have so > many other \d commands already implemented - I say we should pass. > If anything, doing this for triggers would be a much better feature. The other missing

Re: Add psql command to list constraints

2021-11-15 Thread David G. Johnston
On Mon, Nov 15, 2021 at 5:23 PM Tatsuro Yamada < tatsuro.yamada...@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,

Re: Add psql command to list constraints

2021-11-15 Thread Justin Pryzby
Thanks for updating the patch :) > Currently, DBAs need the table name to see the constraint information. Or, they can query pg_constraint or information_schema: check_constraints, table_constraints. > - success = listConversions(pattern, > show_verbose,

Re: Add psql command to list constraints

2021-11-15 Thread Tatsuro Yamada
OT NULL constraint, and so on (based on pg_attribute) - Tab completion - Regression test - Document Any comments welcome! :-D Thanks, Tatsuro Yamada From ce46a3fa7252109348876ab9efff8bafcb119730 Mon Sep 17 00:00:00 2001 From: Tatsuro Yamada Date: Mon, 15 Nov 2021 17:58:31 +0900 Subject: [PAT

Re: Add psql command to list constraints

2021-11-14 Thread Justin Pryzby
Hi, On Mon, Nov 15, 2021 at 10:38:55AM +0900, Tatsuro Yamada wrote: > postgres=# \dco > List of constsraints > Schema | Name | Definition > | Table >

Add psql command to list constraints

2021-11-14 Thread Tatsuro Yamada
Hi, I have been wondering why there is no meta-command for listing constraints in psql. So, I created a POC patch by using my experience developing \dX command in PG14. This feature is helpful for DBAs when they want to check or modify the definition of constraints. The current status of the