Unverified Commit c8058300 authored by Dimitri Fontaine's avatar Dimitri Fontaine Committed by GitHub
Browse files

Fix support for inherited tables. (#35)

A good optimization when using COPY is to use TRUNCATE in the same
transaction, so as to be able to then use COPY FREEZE and avoid some VACUUM
activities after the bulk loading of data.

Trouble is that with inherited tables, the TRUNCATE command would also
remove all the data that was (maybe) just copied to the inheritance tree
nodes.

To fix, just use the TRUNCATE ONLY variant of the command.

This commit also adds full regression testing for this issue, thanks to the
test case provided in #33.
parent 16ba7b0e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment