Re: [Python-Dev] BLOBs in Pg

2009-04-10 Thread Sylvain Thénault
On 09 avril 14:05, Steve Holden wrote: > Oleg Broytmann wrote: > > On Thu, Apr 09, 2009 at 01:14:21PM -0400, Tony Nelson wrote: > >> I use MySQL, but sort of intend to learn PostgreSQL. I didn't know that > >> PostgreSQL has no real support for BLOBs. > > > >I think it has - BYTEA data type.

Re: [Python-Dev] BLOBs in Pg

2009-04-09 Thread Steve Holden
Oleg Broytmann wrote: > On Thu, Apr 09, 2009 at 04:42:21PM -0400, Steve Holden wrote: >> If I can't pass a 256-byte string into a BLOB and get it back without >> anything like this happening then there's *something* in the chain that >> makes the database useless. > > import psycopg2 > > con = ps

Re: [Python-Dev] BLOBs in Pg

2009-04-09 Thread Oleg Broytmann
On Thu, Apr 09, 2009 at 04:42:21PM -0400, Steve Holden wrote: > If I can't pass a 256-byte string into a BLOB and get it back without > anything like this happening then there's *something* in the chain that > makes the database useless. import psycopg2 con = psycopg2.connect(database="test") cur

Re: [Python-Dev] BLOBs in Pg

2009-04-09 Thread Aahz
On Thu, Apr 09, 2009, Steve Holden wrote: > > import psycopg2 as db > conn = db.connect(database="maildb", user="@@@", password="@@@", > host="localhost", port=5432) > curs = conn.cursor() > curs.execute("DELETE FROM tst") > curs.execute("INSERT INTO tst (byt) VALUES (%s)", > ("".join(

Re: [Python-Dev] BLOBs in Pg

2009-04-09 Thread Steve Holden
Tony Nelson wrote: > At 21:24 +0400 04/09/2009, Oleg Broytmann wrote: >> On Thu, Apr 09, 2009 at 01:14:21PM -0400, Tony Nelson wrote: >>> I use MySQL, but sort of intend to learn PostgreSQL. I didn't know that >>> PostgreSQL has no real support for BLOBs. >> I think it has - BYTEA data type. >

Re: [Python-Dev] BLOBs in Pg (was: email package Bytes vs Unicode)

2009-04-09 Thread Tony Nelson
At 21:24 +0400 04/09/2009, Oleg Broytmann wrote: >On Thu, Apr 09, 2009 at 01:14:21PM -0400, Tony Nelson wrote: >> I use MySQL, but sort of intend to learn PostgreSQL. I didn't know that >> PostgreSQL has no real support for BLOBs. > > I think it has - BYTEA data type. So it does; I see that now

Re: [Python-Dev] BLOBs in Pg

2009-04-09 Thread Steve Holden
Oleg Broytmann wrote: > On Thu, Apr 09, 2009 at 01:14:21PM -0400, Tony Nelson wrote: >> I use MySQL, but sort of intend to learn PostgreSQL. I didn't know that >> PostgreSQL has no real support for BLOBs. > >I think it has - BYTEA data type. > But the Python DB adapters appears to require so

Re: [Python-Dev] BLOBs in Pg (was: email package Bytes vs Unicode)

2009-04-09 Thread Oleg Broytmann
On Thu, Apr 09, 2009 at 01:14:21PM -0400, Tony Nelson wrote: > I use MySQL, but sort of intend to learn PostgreSQL. I didn't know that > PostgreSQL has no real support for BLOBs. I think it has - BYTEA data type. Oleg. -- Oleg Broytmannhttp://phd.pp.ru/p...@phd.p