Re: Split pg_dump dump into files and then combine it back

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: dmitry(at)koterov(dot)ru
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Split pg_dump dump into files and then combine it back
Date: 2010-01-15 00:18:14
Message-ID: 17090.1263514694@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dmitry Koterov <dmitry(at)koterov(dot)ru> writes:
> Is there a tool (or a way) to parse a pg_dump'ed (structure only) dump file
> into smaller files (each function in its own file, its table in its own
> etc.) with ability to combine these files later into the proper dump file?

> The main problem is dependencies. Sometimes functions are defined before
> types, sometimes after. The same for cross-schema references. Dump parsing
> is simple, but this process drops dependencies between objects and could not
> be reversed easily.

I don't know of any existing tool. However, pg_dump can be told to
print out its internal dependency information, so in principle you could
build one that looks at that info and reconstitutes the chunks in a safe
order. I'm not sure I see the point though ...

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2010-01-15 00:21:02 Re: Memory Access Violation While Using PQexec
Previous Message John R Pierce 2010-01-15 00:17:46 Re: Avoid transaction abot if/when constraint violated