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 CAOKkKFuaFv1QiWRTiAzFpwwg7+R_QvjJNuLedhzApWut9Rk5iQ@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] psql: add \dcs to list all constraints  (Álvaro Herrera <alvherre@kurilemu.de>)
Responses Re: [PATCH] psql: add \dcs to list all constraints
List pgsql-hackers
Hi Álvaro, and ALL,

>I tested this with one million entries, and the query you proposed was
>more than 1,000 times faster. 

Sorry, I just realized that I accidentally added an unnecessary filter
condition to one of the queries.
Specifically, the extra condition was:
    AND n.nspname LIKE 'many_cns'

Because of this, I was not able to measure the two queries under identical
conditions. I will rerun the benchmarks and share the updated results tomorrow.

> # Summary
> The following changes are planned for the next patch:
>
> - Changed the query (using UNION ALL)
> - Changed the columns and their order (and the sort order accordingly):
> - Schema | Table | Type | Name | Definition
> - Toggle definition verbosity with the + option
> - Added a test case: \dCN cust*.order*
>
> The following items will not be included for now (as they are not critical):
>
> - Option to switch sort order
>   (e.g., sort by constraint name vs. table name)
> - Improved command name checking logic

Yeah, that sounds good to me.

Hopefully, I will also be able to submit a new patch along with the revised
measurement results tomorrow.
 
Regards,
Tatsuro Yamada

 

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: SQL:2011 Application Time Update & Delete
Next
From: Henson Choi
Date:
Subject: Re: Row pattern recognition