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

Re: JDBC and Blobs

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: <dev_hyd2001(at)yahoo(dot)com>,<pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: JDBC and Blobs
Date: 2008-06-19 13:34:15
Message-ID: D960CB61B694CF459DCFB4B0128514C2023A99F2@exadv11.host.magwien.gv.at (view raw or flat)
Thread:
Lists: pgsql-jdbc
Dev wrote:
> I have a field in my database table of type OID which is 
> suppose to be used to store binary data. I plan on using the 
> setBlob and getBlob methods for storing and retrieving 
> entries from the table. Is that the right way to proceed? If 
> I delete a row in that table , will it delete the binary data 
> as well from the database server?

No; the best way would be to create a trigger on the table that
will delete the large object if you delete (or change) the
OID in the table row.

This is of course only practical if the same large object
is not referenced by more than one table...

Yours,
Laurenz Albe

In response to

Responses

pgsql-jdbc by date

Next:From: Tom LaneDate: 2008-06-19 14:43:28
Subject: Re: JDBC and Blobs
Previous:From: Craig RingerDate: 2008-06-19 13:27:36
Subject: Re: JDBC and Blobs

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