Skip to content

Commit 438c1ab

Browse files
authored
Support partitioning for FK (#79)
1 parent f07e63a commit 438c1ab

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sql/foreign_keys_without_index.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ from
1818
inner join pg_catalog.pg_attribute col on col.attrelid = c.conrelid and col.attnum = u.attnum
1919
where
2020
c.contype = 'f' and
21+
c.conparentid = 0 and c.coninhcount = 0 and /* not a constraint in a partition */
2122
nsp.nspname = :schema_name_param::text and
2223
not exists(
2324
select 1

0 commit comments

Comments
 (0)