Problems with large objects - Mailing list pgsql-general

From Shane Wegner
Subject Problems with large objects
Date
Msg-id 20010823171914.A3053@cm.nu
Whole thread Raw
List pgsql-general
Hi,

I am rather new to Postgresql and am having trouble with
some aspects of large objects.  I am coming from a MySQL
backgroun where a longblob could just be another column so
please excuse my ignorance.

I am creating objects using the DBI interface and inserting
data which works well.  I am however having trouble
deleting blob data from the db.
test=> \lo_list
    Large objects
  ID   | Description
-------+-------------
 89803 |
 90068 |
(2 rows)

test=> \lo_unlink 89803
ERROR:  pg_description: Permission denied.
test=>

Do I have to grant any user who needs blobs access to a
system table (pg_description)?  If so, how much damage can
they do?

Also, I have been reading about tforeign keys which looks
very neat.  Can these be extended to large objects.  For
example:
table files
filename varchar(120) not null,
data oid
delete from files where filename='badfile.txt';
Can I have the delete statement above knock out the
associated large object if one exists?

Thanks in advance,
Shane

--
Shane Wegner: shane@cm.nu
              http://www.cm.nu/~shane/
PGP:          1024D/FFE3035D
              A0ED DAC4 77EC D674 5487
              5B5C 4F89 9A4E FFE3 035D

pgsql-general by date:

Previous
From: "Rob Arnold"
Date:
Subject: Re: problems transfering databases
Next
From: Mike Withers
Date:
Subject: Database Permissions