exporting/importing BLOB's (lo_* style)
exporting/importing BLOB's (lo_* style)
От:
kevin kempter <kevin@kevinkempterllc.com>
Дата:
Hi All; I want to dump a set of BLOB's from one db/server and import to another. I assume I cannot do a pg_dump unless I also dump related pg_largeobject rows for the referenced OID I assume I'll need to export via distinct lo_export commands and use lo_import to insert into the second database server. Is there a way to do a bulk transfer or export/import of lo_* style large objects ? Thanks in advance
Re: exporting/importing BLOB's (lo_* style)
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
kevin kempter writes: > Hi All; > I want to dump a set of BLOB's from one db/server and import to another. > I assume I cannot do a pg_dump unless I also dump related > pg_largeobject rows for the referenced OID > I assume I'll need to export via distinct lo_export commands and use > lo_import to insert into the second database server. Why don't you just use pg_dump? regards, tom lane
Re: exporting/importing BLOB's (lo_* style)
От:
Alvaro Herrera <alvherre@commandprompt.com>
Дата:
kevin kempter wrote:
> Hi All;
>
> I want to dump a set of BLOB's from one db/server and import to another.
>
> I assume I cannot do a pg_dump unless I also dump related pg_largeobject
> rows for the referenced OID
pg_dump should dump large objects automatically. If you're dumping a
single table, make sure you use the -b switch. Saith the manpage
-b
--blobs
Include large objects in the dump. This is the default behavior
except when --schema, --table, or --schema-only is specified, so
the -b switch is only useful to add large objects to selective
dumps.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support