Skip to content

Commit 135a507

Browse files
committed
Revert psql bits to display NOT VALID for FKs
These are superseded by pg_get_constraintdef's ability to display the same when appropriate, which is a better place to do it anyway.
1 parent a31ff70 commit 135a507

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy