to quote from the source "Postgresql is a hell when is comes to blobs"

however, I want to test if it's possible to use postgresql 8.0 and storing
the blobs in the database.

I tried to following:
unpack mmbase.jar
edit org/mmbase/storage/implementation/database/resources/postgresql.xml
and:
        - remove <option name="database-stores-binary-as-file" />
        - add <option name="database-supports-blob" />
        - add <type-mapping name="BYTE" min-size="1" max-size="16777216"
type="BYTEA" />
repack mmbase.jar with the new xml and replace it in WEB-INF/lib/

When I upload a picture through my_editors, it shows a thumbnail on the
overview page, but when I click on it, to view the original size, I get a
broken image.
sometimes even the thumbs are broken after a while.

my first question is, has anybody tried to use postgresql8.0 with blobs in
the database?
it's kinda weird that it does work half of the time, instead of not at
all...

there's one interesting I noticed: since the content of the blob is logged
in the debugging log, sometimes I see "escaped" binary data
(\377\330\377\341\027IExif\000\000II*\000...)  but other times it shows it
unescaped / unprintable (you know, the ones that make your terminal go
crazy)

when I check the postgreql doc, it mentions something about having to
escape octects in your queries. Does the storage do any escaping when
doing binary inserts?
(http://www.postgresql.org/docs/8.0/interactive/datatype-binary.html)

Any ideas?


Ricardo.
--------------------------------------------
Ricardo Kustner
IC&S B.V.

Stadhouderslaan 57
3583 JD Utrecht
The Netherlands
http://www.ic-s.nl

T: +31 30 6355730
F: +31 30 6355731 

PGP-key: http://www.ic-s.nl/keys/ricardo.txt

_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to