Cannot dump foreign key constraints on partitioned table
Amul Sul <sulamul@gmail.com>
From: amul sul <sulamul@gmail.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2018-07-11T10:19:59Z
Lists: pgsql-hackers
Hi, On the master head, getConstraints() function skips FK constraints for a partitioned table because of tbinfo->hastriggers is false. While creating FK constraints on the partitioned table, the FK triggers are only created on leaf partitions and skipped for the partitioned tables. To fix this, either bypass the aforementioned condition of getConstraints() or set pg_class.relhastriggers to true for the partitioned table which doesn't seem to be the right solution, IMO. Thoughts? Regards, Amul
Commits
-
Dump foreign keys on partitioned tables
- 2af39c39df94 11.0 landed
- 93ad00c968ae 12.0 landed