Re: [GENERAL] BLOBs - Mailing list pgsql-general

From Peter T Mount
Subject Re: [GENERAL] BLOBs
Date
Msg-id Pine.LNX.3.96.980725123418.3383E-100000@maidast.retep.org.uk
Whole thread Raw
In response to BLOBs  (Dustin Sallings <dustin@spy.net>)
List pgsql-general
[moved this to the hackers list]

On Thu, 23 Jul 1998, Dustin Sallings wrote:

>
>     Hey, I never saw a follow-up on any of the BLOB questions, so I thought
> I'd throw them in here again:
>
>     Is there a way to actually *delete* a BLOB?

the lo_unlink() function will delete the blob given it's oid.

>     Is anyone working on BLOBs?

I'm working on the blob orphaning problem that exists for JDBC & ODBC.

>     Last time I tried to use it, it seemed to store each BLOB in a file by
> itself (two files?) in the middle of my data directory, which seems like a very
> bad thing IMO.

The current scheme actually creates a table and index pair for each blob,
which is what you are seeing.

There was talk of having another storage manager which stores all of them
in a single file, but nothing happened with it.

>  I also couldn't find any documented way of removing them, and
> simply deleting the file(s) caused my vacuum to fail.  I'd really like to use
> BLOBs instead of nasty MIME encoding of large images, but I'd definitely need
> to be able to delete, and it'd be nice if I wouldn't fill up that one directory
> with them.  If nobody is working on BLOBs, it might be fun to find a way to
> implement another storage mechanism, possibly a single file (group of files) to
> store the BLOB, or a directory hierarchy.

Take a look at the ImageViewer example in the src/interfaces/jdbc/examples
directory. Ok, it's in java, but it does show how to store, retrieve and
delete images from a database.

--
Peter T Mount peter@retep.org.uk or petermount@earthling.net
Main Homepage: http://www.retep.org.uk
************ Someday I may rebuild this signature completely ;-) ************
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk


pgsql-general by date:

Previous
From: Guido Piazzi
Date:
Subject: Re: [GENERAL] How about this LOGO?
Next
From: Peter T Mount
Date:
Subject: Re: [GENERAL] Can I store bitmap graphics in a table?