Open jhartwell opened 4 years ago
I have traced the issue and have a fix for it (I can make a pull request). The issue is caused by this left join:
LEFT JOIN pg_index i ON
(pgc.oid = i.indrelid AND i.indkey[0] = a.attnum)
This causes two effects:
The solution I have is just to query the primary key(s) in another query otherwise the SQL gets too complicated.
If you have a column that is a primary key and also has a unique constraint that column will be exported twice in the output. We don't need to worry about the unique constraint so it will need to be ignored