git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 00a1b1e)
Include information about a domain's CHECK constraint, if any, in the
Wed, 6 Apr 2005 05:23:32 +0000 (05:23 +0000)
Wed, 6 Apr 2005 05:23:32 +0000 (05:23 +0000)
output of \dD in psql. From Greg Sabino Mullane.


diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index e10904acdbc959d6fcc6ecfadfea862063cedfd7..45178c0eebbdaadf01dc5f6378c22b270590169e 100644 (file)
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.114 2005年04月01日 05:30:38 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.115 2005年04月06日 05:23:32 neilc Exp $
*/
#include "postgres_fe.h"
#include "describe.h"
@@ -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,
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /