Re: [GENERAL] Can I store bitmap graphics in a table? - Mailing list pgsql-general

From Dustin Sallings
Subject Re: [GENERAL] Can I store bitmap graphics in a table?
Date
Msg-id ML-3.5-SPY.901069158.5758.dustin@bleu.west.spy.net
Whole thread Raw
In response to Re: [GENERAL] Can I store bitmap graphics in a table?  (Dan Delaney <dionysos@dionysia.org>)
Responses Re: [GENERAL] Can I store bitmap graphics in a table?
List pgsql-general
> On Tue, 21 Jul 1998, Matt McClure wrote:
> > You can insert the graphic file by declaring the type to be OID and using
> >  lo_import().
>
> That sounds like it might work. I'll give it a try. However, the
> graphics I'm going to be inserting are not very large, like 50 to
> 100k, I'd like to be able to do it without using the large object
> interface. Anyone have any ideas?

    I'm actually base64 encoding images for my photo album and storing them
in normal tables as char fields.  I've currently got 147 images stored in
146464 rows.  Seems to work OK.

    I had initially thought to use BLOBs, but there were a few things I
didn't like about Postgres BLOBs:

    a) Stored in multiple files on the backend in the same directory as
       the rest of the data.  I would have a lot of directory entries
       right now.

    b) Couldn't figure out how to delete a BLOB and have it go away (since
       you only store the reference to the BLOB).

    c) They don't back up with pgdump, which isn't too bad of a problem,
       since I don't mind making my own dump program.

    Is the BLOB interface being worked on at all?  I'd be interested in
making my program do things a little closer to the ``right'' way.  :)  (or
maybe playing with the BLOB interface myself).

--
SA, software.net         My girlfriend asked me which one I like better.
pub  1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net>
|    Key fingerprint =  87 02 57 08 02 D0 DA D6  C8 0F 3E 65 51 98 D8 BE
L_______________________ I hope the answer won't upset her. ____________


pgsql-general by date:

Previous
From: Steve Logue
Date:
Subject: Re: [GENERAL] Postgres vs commercial products
Next
From: copa@tlx.com
Date:
Subject: Online Marketing