We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60e2d9a commit 9331629Copy full SHA for 9331629
src/bin/psql/describe.c
@@ -2311,8 +2311,13 @@ describeOneTableDetails(const char *schemaname,
2311
PQclear(result);
2312
}
2313
2314
- /* print foreign-key constraints (there are none if no triggers) */
2315
- if (tableinfo.hastriggers)
+ /*
+ * Print foreign-key constraints (there are none if no triggers,
2316
+ * except if the table is partitioned, in which case the triggers
2317
+ * appear in the partitions)
2318
+ */
2319
+ if (tableinfo.hastriggers ||
2320
+ tableinfo.relkind == RELKIND_PARTITIONED_TABLE)
2321
{
2322
printfPQExpBuffer(&buf,
2323
"SELECT conname,\n"
0 commit comments