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

Commit135a507

Browse files
committed
Revert psql bits to display NOT VALID for FKs
These are superseded by pg_get_constraintdef's ability to display thesame when appropriate, which is a better place to do it anyway.
1 parenta31ff70 commit135a507

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

‎src/bin/psql/describe.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,10 +1746,8 @@ describeOneTableDetails(const char *schemaname,
17461746
{
17471747
printfPQExpBuffer(&buf,
17481748
"SELECT conname,\n"
1749-
" pg_catalog.pg_get_constraintdef(r.oid, true) as condef\n");
1750-
if (pset.sversion >=90100)
1751-
appendPQExpBuffer(&buf," ,convalidated\n");
1752-
appendPQExpBuffer(&buf,"FROM pg_catalog.pg_constraint r\n"
1749+
" pg_catalog.pg_get_constraintdef(r.oid, true) as condef\n"
1750+
"FROM pg_catalog.pg_constraint r\n"
17531751
"WHERE r.conrelid = '%s' AND r.contype = 'f' ORDER BY 1",
17541752
oid);
17551753
result=PSQLexec(buf.data, false);
@@ -1768,9 +1766,6 @@ describeOneTableDetails(const char *schemaname,
17681766
PQgetvalue(result,i,0),
17691767
PQgetvalue(result,i,1));
17701768

1771-
if (pset.sversion >=90100&&strcmp(PQgetvalue(result,i,2),"f")==0)
1772-
appendPQExpBuffer(&buf," NOT VALID");
1773-
17741769
printTableAddFooter(&cont,buf.data);
17751770
}
17761771
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp