[PyGreSQL] escape_bytea

Robert Bernier robert.bernier5 at sympatico.ca
Mon Feb 12 12:23:17 EST 2007


I'm getting an error message that says:

NameError: name 'escape_bytea' is not defined


Here's the example code I used:

import pg
conn = pg.connect(dbname="postgres",host="localhost",user="user",passwd="mypassword")
conn.query("create table temp(x bytea)
mybin = file('PyGreSQL.tgz','rb').read()
conn.query("insert into temp values('%s')"%escape_bytea(mybin))


thanks 

Robert


More information about the PyGreSQL mailing list