Encryption/Compression problem using a RDBMS

Aahz Maruch aahz at panix.com
Mon May 21 12:14:32 EDT 2001


In article <HfaO6.1777$556.149792 at juliett.dax.net>,
Thomas Weholt <thomas at cintra.no> wrote:
>
>I want to store encrypted and/or compressed XML in a text-field in a RDBMS,
>currently PostgreSQL. But it crashes in inserts due to the fact that the
>process of compressing or encrypting gives a lot of "unprintable" characters
>in the result data to be stored.
>
>Does anybody know any way of doing this? Can a algoritm return data that's
>friendly in the sense that it doesn't contain special characters that may
>cause trouble?
>
>Any hints are welcome, even if applicable to PostgreSQL only.

I'm assuming you meant "even if not".  IME, most databases have a
special field for storing binary info, and they often have a special API
for getting data in and out of those fields.  Try looking for "BLOb" or
"binary" in the PostGreSQL docs.
-- 
                      --- Aahz  <*>  (Copyright 2001 by aahz at pobox.com)

Androgynous poly kinky vanilla queer het Pythonista   http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

Cole's Law: thinly sliced cabbage



More information about the Python-list mailing list