[PyGreSQL] Incomplete COPY from file
Marina Olhovsky
olhovsky at mshri.on.ca
Thu Jan 25 11:25:24 EST 2007
Thanks, Daryl, that works.
Best regards,
Marina.
---------------------------------------------------------
Marina Olhovsky
Software Engineer, Pawson Laboratory
Mount Sinai Hospital
600 University Avenue, Room 1060
Toronto, Ontario, M5G 1X5
olhovsky at mshri.on.ca
---------------------------------------------------------
-----Original Message-----
From: pygresql-bounces at Vex.Net on behalf of Daryl Tester
Sent: Wed 1/24/2007 7:56 PM
To: PyGreSQL Development; pygresql at Vex.Net
Subject: Re: [PyGreSQL] Incomplete COPY from file
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
_______________________________________________
PyGreSQL mailing list
PyGreSQL at Vex.Net
http://mailman.vex.net/mailman/listinfo/pygresql
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 2833 bytes
Desc: not available
Url : http://mailman.vex.net/pipermail/pygresql/attachments/20070125/c2246182/attachment.bin
More information about the PyGreSQL
mailing list