Re: Diffs between two databases... - Mailing list pgsql-admin

From Alvaro Herrera
Subject Re: Diffs between two databases...
Date
Msg-id 20051118173402.GC25868@surnet.cl
Whole thread Raw
In response to Diffs between two databases...  (Mario Splivalo <mario.splivalo@mobart.hr>)
List pgsql-admin
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.

pgsql-admin by date:

Previous
From: Mario Splivalo
Date:
Subject: Diffs between two databases...
Next
From: Enrico Weigelt
Date:
Subject: Suggested HW for postgres ?