pg_sample
pg_sample copied to clipboard
Skip insert for FK constraints when all data imported
Recursive insert for FK constraints is unnecessary for tables configured to import all data. I have added a check that will skip recursive insert if the table has been configured with --limit to *
This is very useful for cases where we don't support equality operator. For eg, in my case, our psql database has tables that uses point and polygon data types, which does not have equality operators. So, if I limit these tables to * (all data) and skip their recursive inserts, then I get a successful sample otherwise it fails with:
could not identify an equality operator for type <point/polygon>