Sorry for replying so late, and thank you so much for your link it's
very helpful. With the example code, I can catch Postgresql status and
know if the COPY has failed or not (lines 73 and 74). I get a
PGRES_FATAL_ERROR when my datafiles are not ok, and a PGRES_COMMAND_OK
when everything went fine.

This solves my first issue, but my second issue still remains :
is there any way to get the postgresql error message about why the COPY
failed ? Inside psql, we get a very precise message including line 
number, I'd like to display that.

-- 
Posted via http://www.ruby-forum.com/.