On 1999-12-01, Alf Lewerken mentioned:

> How can I backup large objects of my database.
> 
> I use pg_dump <databasename>
> 
> This dumps the databasetables and indices properly but how do I
> dump large objects?
> 
> Because I use the oid´s of the large objects as a reference in the tuples in
> some tables, the oid´s of the large object is important when dumping/restoring.


There is no such facility right now.

I added some large object handling commands into psql for 7.0, such as
\lo_export, but those only work on a single object. I have no plans to
implement any sort of loop, but perhaps you could write a shell script
wrapper. Of course, that's not going to help you right now.

The purpose of pg_dump is to create a text file that can be read back by
psql, so interspersing the actual large object data in there won't be too
much fun. All the LO handling functions can only read or write a file on
the file sytem anyway, there is no COPY equivalent. pg_dump would need to
export the objects to files that would need to be kept with the actual
dump. That's actually feasible, I believe.

As for an immediate solution, chances are you'd need to write something in
C that does this.

        -Peter


-- 
Peter Eisentraut                  Sernanders väg 10:115
[EMAIL PROTECTED]                   75262 Uppsala
http://yi.org/peter-e/            Sweden



************

Reply via email to