From: Alvaro Herrera <alvherre@commandprompt.com>
To: Mario Splivalo <mario.splivalo@mobart.hr>
Cc: pgsql-admin@postgresql.org
Subject: Re: Diffs between two databases...
Date: Fri, 18 Nov 2005 14:34:02 -0300
Message-ID: <20051118173402.GC25868@surnet.cl> (raw)
In-Reply-To: <1132321646.7965.22.camel@ekim>
References: <1132321646.7965.22.camel@ekim>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: alvherre@commandprompt.com, mario.splivalo@mobart.hr
Subject: Re: Diffs between two databases...
In-Reply-To: <20051118173402.GC25868@surnet.cl>
References: <1132321646.7965.22.camel@ekim> <20051118173402.GC25868@surnet.cl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox