[Psycopg] [psycopg] #126: copy_from fails with large files using ubuntu postgres 8.1.4
psycopg
fog at initd.org
Wed Oct 17 19:05:35 CEST 2007
#126: copy_from fails with large files using ubuntu postgres 8.1.4
------------------------------+---------------------------------------------
Reporter: jasonculverhouse | Owner: fog
Type: defect | Status: assigned
Priority: normal | Milestone: PSYCOPG 2.0.7
Component: psycopg2 | Version: 2.0.5
Severity: normal | Resolution:
Keywords: |
------------------------------+---------------------------------------------
Comment (by LanceRushing):
Just in case someone else if having this problem, here is a work around
(if you the psql client installed).
{{{
import subprocess
psqlcmd = os.path.join('c:\\', 'Program Files', 'PostgreSQL', '8.2',
'bin', 'psql')
input_file = open("test.txt","r")
p = subprocess.Popen('"' + psqlcmd + '" -h 192.168.1.1 -U user_foo db_bar
-c "COPY table FROM STDIN;"', stdin=input_file);
p.wait()
}}}
--
Ticket URL: <http://initd.org/tracker/psycopg/ticket/126#comment:5>
psycopg <http://initd.org/>
psycopg
More information about the Psycopg
mailing list