Mario Splivalo wrote:
> I've seen that I can do pg_dump to a file with pg_dump -Fc, and then I
> can do pg_restore -Fc -l <dump.file> to have the list of all the
> database objects. There I can see the functions, but how do I (re)create
> just the desired function?
Use pg_restore -L.
> What would suit me the best would be a tool/util that would drop each
> db.object into a separate file. Then I could create a script wich will
> 'load' each object from the file when I want it (so I don't have
> dependency problems).
I think you could use the "tar" method (-Ft option to pg_dump) and
extract the body of each element from the generated dump. Treat it as a
standard tar archive.
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
In response to
pgsql-admin by date
|Next:||From: Enrico Weigelt||Date: 2005-11-18 19:05:50|
|Subject: Suggested HW for postgres ?|
|Previous:||From: Mario Splivalo||Date: 2005-11-18 13:47:26|
|Subject: Diffs between two databases...|