Thread: libpq, large Objects

libpq, large Objects

From
"John Huttley"
Date:
I've been programming with libpq and things have been
working quite well.

There are two puzzles though.

How do you destroy a large_object?
AFAIK, the only way to do it is to put its OID into a tuple in a table and
then delete that tuple.


How do you truncate a large_object?

Regards,

John




Re: [INTERFACES] libpq, large Objects

From
Tom Lane
Date:
"John Huttley" <john@mwk.co.nz> writes:
> How do you destroy a large_object?

lo_unlink(oid_of_large_object)

> AFAIK, the only way to do it is to put its OID into a tuple in a table and
> then delete that tuple.

AFAIK, that will *not* remove the LO, just the referencing tuple ...

> How do you truncate a large_object?

I don't believe there's any way to do that.  It's an oversight, for
sure.
        regards, tom lane