vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi all, I'm currently investigating using the LargeObject facility to store user uploaded files of size up to 2GB directly in the database. However, I'm currently using a JDBC intermediate driver on top of the Postgres JDBC driver (Sequoia) to do data replication, so I'm tied to using the pure JDBC specification and unable to use the LargeObjectManager directly. I'm using getBlob() and setBlob() in order to store and retrieve my File objects, which all works fine. However, when I delete the row from my data table. the data isn't being deleted from the pg_largeobject table. Should I be deleting from the pg_largeobject table myself after retrieving the LOID from my own table, or is there a more proper way to do this? I'm using server version 8.0.9 and driver version 8.0-320. Thanks, Jason Blumenkrantz ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster |
| ||||
| On Thu, 10 Jan 2008, Jason Blumenkrantz wrote: > [how do I auto delete a blob when the row referring to it goes away] The easiest thing to do is to define an AFTER DELETE trigger on your table to cleanup the LO when the row goes away. Kris Jurka ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate |
| Thread Tools | |
| Display Modes | |
| |