Hi all,
Is there an easy way to copy a large object to a new one, having a new
OID and it's content independent from the original ?
The large object API functions would only allow to stream the original
to the client and stream it back to the server for the copy, which is
not really optimal... I would like to do it all on the server side. The
server side functions would work to export the original to a file and
then import it again, but that needs superuser privileges which rules
that out.
I could simply copy the contents of the pg_largeobject table, but then I
need a new OID for that. I can use the server side large object API to
create an empty large object, delete it, then use the obtained OID for
the copy... but that also sounds somewhat suboptimal.
Is there any simple way to copy a large object ?
Cheers,
Csaba.