pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedDeleting large object from table pg_largeobject
2+ messages / 2 participants
[nested] [flat]
* Deleting large object from table pg_largeobject
@ 2003-03-12 20:59 David <cyberguard@sympatico.ca>
2003-03-14 11:02 ` Re: Deleting large object from table pg_largeobject Richard Huxton <dev@archonet.com>
0 siblings, 1 reply; 2+ messages in thread
From: David @ 2003-03-12 20:59 UTC (permalink / raw)
To: pgsql-sql
Hello,
I'm trying to delete a large object form the pg_largeobject table but I
get a permission denied error (in both psql and with the java JDBC ).
Here is my sql stament in order:
fletcher=> SELECT * from md_blob ;
blob_id | text | file_name | mime_type
---------+--------+-----------+------------
4 | 292470 | 2.jpg | image/jpeg
21 | 292572 | 2.jpg | image/jpeg
22 | 292578 | 2.jpg | image/jpeg
(3 rows)
== If I try to delete it directly
fletcher=> delete from pg_largeobject where loid = (
select text from md_blob
where blob_id = 4 );
ERROR: pg_largeobject: permission denied
fletcher=> delete from pg_largeobject where loid =
292470;
ERROR: pg_largeobject: permission denied
== If I try to delete all reference to it before, and then delete it
fletcher=> DELETE FROM md_blob WHERE blob_id='4';
DELETE 1
fletcher=> delete from pg_largeobject where loid = 292470;
ERROR: pg_largeobject: permission denied
fletcher=>
Anybody know what I am doing wrong?
My ultimate goal is to delete the largeobject when I delete the row in
md_blob;
here is my system:
RedHat Linux 7.3
PostgreSQL 7.3.2
JDBC driver from postgresql (v 7.3 with the property ?compatible=7.1 )
Java 1.3
thanks
david
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Deleting large object from table pg_largeobject
2003-03-12 20:59 Deleting large object from table pg_largeobject David <cyberguard@sympatico.ca>
@ 2003-03-14 11:02 ` Richard Huxton <dev@archonet.com>
0 siblings, 0 replies; 2+ messages in thread
From: Richard Huxton @ 2003-03-14 11:02 UTC (permalink / raw)
To: David <cyberguard@sympatico.ca>; pgsql-sql
On Wednesday 12 Mar 2003 8:59 pm, David wrote:
> Hello,
>
> I'm trying to delete a large object form the pg_largeobject table but I
> get a permission denied error (in both psql and with the java JDBC ).
>
> Here is my sql stament in order:
>
> fletcher=> SELECT * from md_blob ;
> blob_id | text | file_name | mime_type
> ---------+--------+-----------+------------
> 4 | 292470 | 2.jpg | image/jpeg
> 21 | 292572 | 2.jpg | image/jpeg
> 22 | 292578 | 2.jpg | image/jpeg
> (3 rows)
>
> == If I try to delete it directly
> fletcher=> delete from pg_largeobject where loid = (
> select text from md_blob
> where blob_id = 4 );
>
> ERROR: pg_largeobject: permission denied
Should you not be using the special large-object methods?
I don't use Java, but there's a class mentioned in the manual : Client
Interfaces : JDBC : extensions.
With psql you probably want \lo_unlink
HTH
--
Richard Huxton
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-03-14 11:02 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-03-12 20:59 Deleting large object from table pg_largeobject David <cyberguard@sympatico.ca>
2003-03-14 11:02 ` Richard Huxton <dev@archonet.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox