From: | "Alexander V(dot) Chernikov" <melifaro(at)ipfw(dot)ru> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #4670: Cannot get domain constraint names from psql |
Date: | 2009-02-22 01:55:30 |
Message-ID: | 200902220155.n1M1tUgQ040826@wwwmaster.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 4670
Logged by: Alexander V. Chernikov
Email address: melifaro(at)ipfw(dot)ru
PostgreSQL version: 8.3.3
Operating system: FreeBSD 7.1
Description: Cannot get domain constraint names from psql
Details:
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.
Patch for adding this functionality is quite trivial, for example:
--- bin/psql/describe.c.orig 2009-02-22 02:58:23.000000000 +0300
+++ bin/psql/describe.c 2009-02-22 03:05:54.000000000 +0300
@@ -1628,6 +1628,7 @@
" WHEN NOT t.typnotnull
AND t.typdefault IS NOT NULL THEN 'default '||t.typdefault\n"
" ELSE ''\n"
" END as \"%s\",\n"
+ " r.conname as \"%s\",\n"
" pg_catalog.pg_get_constraintdef(r.oid, true)
as \"%s\"\n"
"FROM pg_catalog.pg_type t\n"
" LEFT JOIN pg_catalog.pg_namespace n ON n.oid =
t.typnamespace\n"
@@ -1637,6 +1638,7 @@
_("Name"),
_("Type"),
_("Modifier"),
+ _("Constraint_name"),
_("Check"));
processSQLNamePattern(pset.db, &buf, pattern, true, false,
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-02-22 04:48:48 | Re: BUG #4670: Cannot get domain constraint names from psql |
Previous Message | John R Pierce | 2009-02-21 09:22:31 | Re: BUG #4668: Windows installer package |