Re: [GENERAL] BLOBs

From: Peter T Mount <peter(at)retep(dot)org(dot)uk>
To: Dustin Sallings <dustin(at)spy(dot)net>
Cc: PostgreSQL General Questions List <pgsql-general(at)postgresql(dot)org>, PostgreSQL Hackers List <hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] BLOBs
Date: 1998-07-25 11:38:41
Message-ID: Pine.LNX.3.96.980725123418.3383E-100000@maidast.retep.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

[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(at)retep(dot)org(dot)uk or petermount(at)earthling(dot)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(at)maidstone(dot)gov(dot)uk

In response to

  • BLOBs at 1998-07-24 04:55:54 from Dustin Sallings

Browse pgsql-general by date

  From Date Subject
Next Message Peter T Mount 1998-07-25 13:05:10 Re: [GENERAL] Can I store bitmap graphics in a table?
Previous Message Guido Piazzi 1998-07-25 10:33:49 Re: [GENERAL] How about this LOGO?

Browse pgsql-hackers by date

  From Date Subject
Next Message Egon Schmid 1998-07-25 12:04:24 Compile of recent CVS fails
Previous Message D'Arcy J.M. Cain 1998-07-25 04:08:20 Re: [HACKERS] cidr