[Dbix-class] looking for some postgres bytea/lob pointers

John Napiorkowski jjn1056 at yahoo.com
Fri Jun 9 07:11:06 CEST 2006


I'm looking for some suggestions about the best way to
access bytea or lob objects in Postgres using DBIx.  I
know there was a discussion about this last month, but
there wasn't any code examples and to be honest I am a
bit of a newb to this.

The only example I could find was over at the catalyst
mailing list at:

which is probably more than I need, since my expected
binary files will be measured in kbytes, not
megabytes.  Based on this I was hoping to use a bytea
column instead of a lob and have to use the lob loader

Everyone seems to think using bytea is easier and
preferable as long as you don't need to stream or work
with very large files.  However I can't find a good
example of this.  Using the standard ->create I find I
am limited to 4000 bytes which is a bit too small for
me needs.

Any suggestion about where I can find some examples
would be appreciated.  I've already googled through
the postgresql site an I checked over at the pgpdb
mailing list.  I'm posting this here because I'd like
to stay within the DBIx model if possible and was
hoping someone else has already run into this issue.

The actual need I have is to store web images and
flash video files in the database.  Right now I store
everything on the filesystem but I have a mandate from
the user for it to be in the database.  This is also
my preference so I am not inclined to try to talk him
out of it unless it just can't be done.

Thanks for you suggestions in advance!  --john

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Dbix-class mailing list