Skip site navigation (1) Skip section navigation (2)

Re: Diffs between two databases...

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Mario Splivalo <mario(dot)splivalo(at)mobart(dot)hr>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Diffs between two databases...
Date: 2005-11-18 17:34:02
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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                      
The PostgreSQL Company - Command Prompt, Inc.

In response to

pgsql-admin by date

Next:From: Enrico WeigeltDate: 2005-11-18 19:05:50
Subject: Suggested HW for postgres ?
Previous:From: Mario SplivaloDate: 2005-11-18 13:47:26
Subject: Diffs between two databases...

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group