X-Original-To: pgsql-sql@postgresql.org Received: from anchor-post-39.mail.demon.net (anchor-post-39.mail.demon.net [194.217.242.80]) by postgresql.org (Postfix) with ESMTP id C41AC47590C for ; Fri, 14 Mar 2003 06:02:52 -0500 (EST) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-39.mail.demon.net with esmtp (Exim 3.36 #2) id 18tmxe-0004TG-0d; Fri, 14 Mar 2003 11:02:50 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 314AC175A4; Fri, 14 Mar 2003 11:02:49 +0000 (GMT) Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id 91DA6175A3; Fri, 14 Mar 2003 11:02:48 +0000 (GMT) Content-Type: text/plain; charset="utf-8" From: Richard Huxton Organization: Archonet Ltd To: David , pgsql-sql@postgresql.org Subject: Re: Deleting large object from table pg_largeobject Date: Fri, 14 Mar 2003 11:02:50 +0000 User-Agent: KMail/1.4.3 References: <1047502777.1661.553.camel@localhost.localdomain> In-Reply-To: <1047502777.1661.553.camel@localhost.localdomain> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200303141102.50176.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Archive-Number: 200303/360 X-Sequence-Number: 12399 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=3D> 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) > > =3D=3D If I try to delete it directly > fletcher=3D> delete from pg_largeobject where loid =3D ( > select text from md_blob > where blob_id =3D 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=20 Interfaces : JDBC : extensions. With psql you probably want \lo_unlink=20 HTH --=20 Richard Huxton