From: | Csaba Nagy <nagy(at)ecircle-ag(dot)com> |
---|---|
To: | Postgres general mailing list <pgsql-general(at)postgresql(dot)org> |
Subject: | Copying large object in a stored procedure |
Date: | 2008-04-15 11:30:52 |
Message-ID: | 1208259052.8259.329.camel@PCD12478 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Karsten Hilbert | 2008-04-15 11:50:49 | Re: Storage sizes for dates/times (documentation bug?) |
Previous Message | Craig Ringer | 2008-04-15 07:16:13 | Re: COPY to STDOUT and pipes |