diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 410131e5c7..e72fdc5f72 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -2311,8 +2311,13 @@ describeOneTableDetails(const char *schemaname, PQclear(result); } - /* print foreign-key constraints (there are none if no triggers) */ - if (tableinfo.hastriggers) + /* + * Print foreign-key constraints (there are none if no triggers, + * except if the table is partitioned, in which case, any needed + * triggers are present in the table's partitions) + */ + if (tableinfo.hastriggers || + tableinfo.relkind == RELKIND_PARTITIONED_TABLE) { printfPQExpBuffer(&buf, "SELECT conname,\n"