Am 26.03.2010 13:08 schrieb Lars Noschinski:
I'm trying to insert values into a bytea column using the DB-API 2.0
interface of PyGreSQL. The table is declared as

     CREATE TABLE foo (foo BYTEA);

and i tried the following approaches:

     curs.execute("INSERT INTO foo VALUES (%s)", ["\\"])
     curs.execute("INSERT INTO foo VALUES (%s)", [pgdb.Binary("\\")])

Hi Lars,

the latter approach is correct and working properly since PyGreSQL 4.0.
Older versions had Problems with backslashes, as you experienced.

-- Christoph
_______________________________________________
PyGreSQL mailing list
[email protected]
http://mailman.vex.net/mailman/listinfo/pygresql

Reply via email to