[PyGreSQL] Incomplete COPY from file

Daryl Tester daryl.tester at iocane.com.au
Wed Jan 24 19:56:21 EST 2007


Marina Olhovsky wrote:

> for i in my_ids:
>   outfile.write(`i[0]` + '\n')

You should close, or at least flush the file before executing -

> q2 = "COPY tbl_2(new_id) FROM '" + fname + "'"
> db.query(q2)

Regards,
  Daryl Tester
 


More information about the PyGreSQL mailing list