cPickle and pgsql...damn!!

Gerardo Herzig -Departamento de Proyectos Especiales e Internet- Facultad de Medicina gherzig at fmed.uba.ar
Tue Jul 20 23:48:29 CEST 2004

Hi people, im having trouble when trying to UnPickle a 'pickled' field from a 
psql (7.3) field.

I just want:

>damnDict = {'foo' : 'bar'}
>serializedDict = cPickle.dumps(damnDict)
>print serializedDict
>pgconn.query('insert into TABLE values (%s)' % serializedDict)
>result = pgconn.query('select * from TABLE').getresult()[0]
>print result
And....voila!! There is not the same piece of crap!!
When i try to unpickle it (and get the original damnDict) i got 'Cant find 
MARK' error msg. Maybe this is a PostgreSQL issue, but if someone have a 
Here is the data
Python 2.2
PostgreSQL 7.3
The field where i put the serialized data is a text field.

Gerardo Herzig
Departamento de Proyectos Especiales e Internet
Facultad de Medicina

More information about the Python-list mailing list