fixup.patch
text/x-diff
Patch
Format: unified
| File | + | − |
|---|---|---|
| src/bin/psql/describe.c | 5 | 4 |
commit 12642d9ff66a2661d4f707cb15b0c3de6a9e1d4e
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
AuthorDate: Mon Mar 25 22:50:59 2019 -0300
CommitDate: Mon Mar 25 22:51:15 2019 -0300
fixup
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index fc404bbaab8..91f2306734e 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -2489,11 +2489,12 @@ describeOneTableDetails(const char *schemaname,
printfPQExpBuffer(&buf,
"SELECT conname, conrelid::pg_catalog.regclass AS ontable,\n"
" pg_catalog.pg_get_constraintdef(oid, true) AS condef\n"
- " FROM pg_catalog.pg_constraint c LEFT JOIN \n"
- " pg_catalog.pg_partition_ancestors(c.confrelid) ON (true)\n"
- " WHERE confrelid = '%s' AND contype = 'f' AND conparentid = 0\n"
+ " FROM pg_catalog.pg_constraint c\n"
+ " WHERE confrelid IN (SELECT pg_catalog.pg_partition_ancestors('%s')\n"
+ " UNION ALL VALUES (regclass '%s'))\n"
+ " AND contype = 'f' AND conparentid = 0\n"
"ORDER BY conname;",
- oid);
+ oid, oid);
}
else
{