[ZODB-Dev] Relstorage Blob support and Oracle

Martijn Pieters mj at zopatista.com
Sun Jun 12 15:39:12 EDT 2011


On Sun, Jun 12, 2011 at 16:40, Hanno Schlichting <hanno at hannosch.eu> wrote:
> Looking at the most recent docs for the bytea type [1] there's two
> encoding schemes. The new default in 9.0+ is called hex and doesn't
> suffer from the same problems as the old "escape" format, which
> couldn't represent some data - which in turn prompted Shane to do the
> base64 encoding.

I am kind of wondering as to why a base64 encoding is needed at all.
The psycopg supports the required encoding / decoding steps natively
for both escape formats, and will do so transparently. See:

  http://initd.org/psycopg/docs/usage.html#index-7

Not encoding ZODB pickles for the object_state table from and to
base64 would save a lot of space (base64 encoding expands data to 133%
it's original size, leading to up to 1/3rd more space required to
store a Zope ZODB in PostgreSQL than in other databases.

-- 
Martijn Pieters


More information about the ZODB-Dev mailing list