Hi, On 10/7/05, Richard Huxton <dev@archonet.com> wrote: > Deleting the OID does not remove the object itself - see details of > lo_unlink() in Chapter 28 of the manuals. > > I seem to recall some other utilities in the contrib/ directory of the > source distribution too.
Could it be `contrib/lo'? Here's some snippet from contrib/lo/README.lo: [Snippet] One of the problems with the JDBC driver (and this affects the ODBC driver also), is that the specification assumes that references to BLOBS (Binary Large OBjectS) are stored within a table, and if that entry is changed, the associated BLOB is deleted from the database. As PostgreSQL stands, this doesn't occur. Large objects are treated as objects in their own right; a table entry can reference a large object by OID, but there can be multiple table entries referencing the same large object OID, so the system doesn't delete the large object just because you change or remove one such entry. [...] I've fixed this by creating a new data type 'lo', some support functions, and a Trigger which handles the orphaning problem. The trigger essentially just does a 'lo_unlink' whenever you delete or modify a value referencing a large object. When you use this trigger, you are assuming that there is only one database reference to any large object that is referenced in a trigger-controlled column! [/Snippet] Regards. ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org