Re: [PATCH] psql: add \dcs to list all constraints

From: Tatsuro Yamada <yamatattsu(at)gmail(dot)com>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] psql: add \dcs to list all constraints
Date: 2026-01-21 08:46:45
Message-ID: CAOKkKFuxZm1KUmyn-mqXwoHq_EJMMFr1cLpkEp9=b_dHGME-Xg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Álvaro and all,

> The next patch will include the following two fixes:
> - Display all constraint types in full and in lowercase.
> - Add test cases for temporal constraints.

The above two issues have been addressed in the V7 patch.
Below is an example output.

List of constraints
Schema | Table | Type | Name
--------+-----------------+-------------+------------------------------------
public | temporal_con_fk | foreign key | temporal_con_fk_p_id_valid_at_fkey
public | temporal_con_pk | not-null | temporal_con_pk_id_not_null
public | temporal_con_pk | not-null | temporal_con_pk_valid_at_not_null
public | temporal_con_pk | primary key | temporal_con_pk_pkey
public | temporal_con_uq | unique | temporal_con_uq_id_valid_at_key
(5 rows)

Please find the attached file.

Regards,
Tatsuro Yamada

Attachment Content-Type Size
v7-0001-Add-list-constraints-meta-command-dCN-on-psql.patch application/octet-stream 41.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nitin Motiani 2026-01-21 08:53:46 Re: Adding pg_dump flag for parallel export to pipes
Previous Message Chao Li 2026-01-21 08:45:35 Re: updates for handling optional argument in system functions