Skip to content

Commit

Permalink
Merge pull request #26 from skissane/support-partitioning
Browse files Browse the repository at this point in the history
Support PostgreSQL 10+ partitioning
  • Loading branch information
achiku authored Jan 23, 2024
2 parents 54f79e9 + 35d6db4 commit dff6de0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ JOIN ONLY pg_namespace n
ON n.oid = c.relnamespace
LEFT JOIN pg_description pd ON pd.objoid = c.oid AND pd.objsubid = 0
WHERE n.nspname = $1
AND c.relkind = 'r'
AND c.relkind in ('r','p') AND NOT COALESCE((row_to_json(c)->>'relispartition')::boolean,false)
ORDER BY c.relname
`

Expand Down Expand Up @@ -79,6 +79,7 @@ from (
where ns.nspname = $1
and cl.relname = $2
and con1.contype = 'f'
and (coalesce((row_to_json(con1)->>'conparentid'),'0')::oid) = 0
) con
join pg_attribute att
on att.attrelid = con.confrelid and att.attnum = con.child
Expand Down

0 comments on commit dff6de0

Please sign in to comment.