Closed syadlowsky closed 8 years ago
This looks good; just please add a test :)
Added a test. The decreased coverage is an all-hell-breaks-loose type of error for which I check, but don't know how to test without the database dying in between.
I just noticed you don't check the error status of PQputCopyData
; please do that. You can move the existing error code you wrote into a function and call that function each time; that way you can test the error code by just providing a malformed CSV file.
Excellent, thanks!
I've added a copy function. This is, unfortunately, not defined in the DBI interface, so I added it as a separate function of PostgreSQL.