Re: BUG #4670: Cannot get domain constraint names from psql - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #4670: Cannot get domain constraint names from psql
Date
Msg-id 4828.1235278128@sss.pgh.pa.us
Whole thread Raw
In response to BUG #4670: Cannot get domain constraint names from psql  ("Alexander V. Chernikov" <melifaro@ipfw.ru>)
List pgsql-bugs
"Alexander V. Chernikov" <melifaro@ipfw.ru> writes:
> It would be nice to see domain constraint names in \dD output of psql
> utility. Without this feature the only way to delete (or modify) constraint
> is to do pg_dump -s (or use something like phpgadmin) to find out constraint
> name and only after that issue ALTER DOMAIN .. DROP constraint statement.

Try
select * from information_schema.domain_constraints;

The \dD view is already too wide IMHO, no need to make it wider for this.

However, your proposed patch points out something that seems to me to be
a bug in \dD: it produces multiple rows for the same domain, if said
domain has more than one constraint.  Surely that's confusing and
undesirable.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Alexander V. Chernikov"
Date:
Subject: BUG #4670: Cannot get domain constraint names from psql
Next
From: "Peter Woodward"
Date:
Subject: BUG #4671: Cluster Initialisation Fails on FreeBSD