Re: [SQLObject] Binary support (BLOB columns)
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Martin B. <mar...@gm...> - 2005-01-14 18:26:17
|
On Fri, 14 Jan 2005 16:39:01 +0300, Oleg Broytmann <ph...@ma...> wrote: > On Fri, Jan 14, 2005 at 03:11:57PM +0300, Oleg Broytmann wrote: > > On Fri, Jan 14, 2005 at 09:23:36AM +0800, Hong Yuan wrote: > > > the SELECT is not using a WHERE > > > > Ah, sorry. Ok, I reproduced the problem. I even reduced it to the > > query: > > SELECT profile.id, profile.image FROM profile WHERE profile.image = '\\'; > > I ran it directly with psql, and got: > > > > ERROR: Bad input string for type bytea > > > > Ouch! I found it in Postgres documentation: zero octet, single quote > > and a backslash must be double-escaped: \\000, \\' and \\\\. BTW all the gory details here: http://www.postgresql.org/docs/7.4/static/datatype-binary.html this is what psycopg.Binary encapsulates (in C). see psycopg2 source code, adapter_binary.c |