Skip site navigation (1) Skip section navigation (2)

Re: Deleting a list of external xinv/xinx files using JDBC

From: Peter T Mount <peter(at)retep(dot)org(dot)uk>
To: xriley(at)encryptix(dot)com
Cc: pgsql-interfaces(at)postgresql(dot)org, xriley(at)encryptix(dot)com
Subject: Re: Deleting a list of external xinv/xinx files using JDBC
Date: 2001-01-16 09:12:46
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
Quoting xriley(at)encryptix(dot)com:

> I'm using the JDBC setBytes to insert a list of large object blobs.  
> The side-effect of this is two external files (xinvOID and xinxOID) 
> for every blob inserted.
> If I use a JDBC delete sql statement to delete the records
> containing the blobs,  the external xin* files are not deleted.
> Is this by design? If so, is there a work around for deleting
> a LIST of records AND the associated external blob file?

Yes this is by design (in the backend) as there is no real link between your 
table and the blob. If you look under /contrib you will find ways of fixing 
this using triggers that watch your table and when a row containing a blob is 
deleted or the blob amended then the old blob is deleted in the background.


Peter Mount peter(at)retep(dot)org(dot)uk
PostgreSQL JDBC Driver:
RetepPDF PDF library for Java:

In response to

pgsql-interfaces by date

Next:From: Michael StephensonDate: 2001-01-16 09:43:02
Subject: Re: Patch for JDBC timestamp problems
Previous:From: Dave PageDate: 2001-01-16 08:25:36
Subject: RE: ODBC and COPY

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group