mirror of
https://github.com/postgres/postgres.git
synced 2025-05-21 15:54:08 +03:00
psql: have \d show FKs on partitioned tables
Commit 3de241dba86f missed to update psql to display foreign keys on partitioned tables. Add that. Reported-by: Amit Langote Author: Amit Langote Reviewed-by: Álvaro Herrera Discussion: https://postgr.es/m/a66879e5-636f-d4dd-b4a4-92bdca5a828f@lab.ntt.co.jp
This commit is contained in:
parent
60e2d9ab14
commit
93316299d6
@ -2311,8 +2311,13 @@ describeOneTableDetails(const char *schemaname,
|
|||||||
PQclear(result);
|
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 the triggers
|
||||||
|
* appear in the partitions)
|
||||||
|
*/
|
||||||
|
if (tableinfo.hastriggers ||
|
||||||
|
tableinfo.relkind == RELKIND_PARTITIONED_TABLE)
|
||||||
{
|
{
|
||||||
printfPQExpBuffer(&buf,
|
printfPQExpBuffer(&buf,
|
||||||
"SELECT conname,\n"
|
"SELECT conname,\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user