Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite6557e9

Browse files
author
Neil Conway
committed
Include information about a domain's CHECK constraint, if any, in the
output of \dD in psql. From Greg Sabino Mullane.
1 parent00a1b1e commite6557e9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎src/bin/psql/describe.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.114 2005/04/01 05:30:38 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.115 2005/04/06 05:23:32 neilc Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"describe.h"
@@ -1579,14 +1579,17 @@ listDomains(const char *pattern)
15791579
" WHEN t.typnotnull AND t.typdefault IS NULL THEN 'not null'\n"
15801580
" WHEN NOT t.typnotnull AND t.typdefault IS NOT NULL THEN 'default '||t.typdefault\n"
15811581
" ELSE ''\n"
1582-
" END as \"%s\"\n"
1582+
" END as \"%s\",\n"
1583+
" pg_catalog.pg_get_constraintdef(r.oid, true) as \"%s\"\n"
15831584
"FROM pg_catalog.pg_type t\n"
15841585
" LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace\n"
1586+
" LEFT JOIN pg_catalog.pg_constraint r ON t.oid = r.contypid\n"
15851587
"WHERE t.typtype = 'd'\n",
15861588
_("Schema"),
15871589
_("Name"),
15881590
_("Type"),
1589-
_("Modifier"));
1591+
_("Modifier"),
1592+
_("Check"));
15901593

15911594
processNamePattern(&buf,pattern, true, false,
15921595
"n.nspname","t.typname",NULL,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp