/* * Destroys an existing large object (not to be confused with a descriptor!) * * returns -1 if failed */ int inv_drop(Oid lobjId) { LargeObjectDrop(lobjId); /* Delete any comments on the large object */ DeleteComments(lobjId, LargeObjectRelationId, 0); /* * Advance command counter so that tuple removal will be seen by later * large-object operations in this transaction. */ CommandCounterIncrement(); return 1; }
/* * Destroys an existing large object (not to be confused with a descriptor!) * * returns -1 if failed */ int inv_drop(Oid lobjId) { Oid classoid; LargeObjectDrop(lobjId); /* pg_largeobject doesn't have a hard-coded OID, so must look it up */ classoid = get_system_catalog_relid(LargeObjectRelationName); /* Delete any comments on the large object */ DeleteComments(lobjId, classoid, 0); /* * Advance command counter so that tuple removal will be seen by later * large-object operations in this transaction. */ CommandCounterIncrement(); return 1; }