diff options
author | Neil Conway | 2005-04-06 05:23:32 +0000 |
---|---|---|
committer | Neil Conway | 2005-04-06 05:23:32 +0000 |
commit | 4df3000f68364dbae142155b59dd544afbdc03c9 (patch) | |
tree | 872d0f44a2965c902726b1aed37e5ae720b294ce | |
parent | 32bfe438713543a9daa44c05661247207c91f3a7 (diff) |
Include information about a domain's CHECK constraint, if any, in the
output of \dD in psql. From Greg Sabino Mullane.
-rw-r--r-- | src/bin/psql/describe.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 813ce4fa1e..04f09eea15 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1579,14 +1579,17 @@ listDomains(const char *pattern) " WHEN t.typnotnull AND t.typdefault IS NULL THEN 'not null'\n" " WHEN NOT t.typnotnull AND t.typdefault IS NOT NULL THEN 'default '||t.typdefault\n" " ELSE ''\n" - " END as \"%s\"\n" + " END 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" + " LEFT JOIN pg_catalog.pg_constraint r ON t.oid = r.contypid\n" "WHERE t.typtype = 'd'\n", _("Schema"), _("Name"), _("Type"), - _("Modifier")); + _("Modifier"), + _("Check")); processNamePattern(&buf, pattern, true, false, "n.nspname", "t.typname", NULL, |