Re: pg_restore --no-post-data and --post-data-only - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: pg_restore --no-post-data and --post-data-only
Date
Msg-id 3E833D80-7823-4BE6-98C5-231D33CD8CC9@nasby.net
Whole thread Raw
In response to Re: pg_restore --no-post-data and --post-data-only  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: pg_restore --no-post-data and --post-data-only
List pgsql-hackers
On Aug 26, 2011, at 12:15 PM, Andrew Dunstan wrote:
> I knew there would be some bike-shedding about how we specify these things, which is why I haven't written docs yet.

While we're debating what shade of yellow to paint the shed...

My actual use case is to be able to be able to "inject" SQL into a SQL-formatted dump either pre- or post-data (I'm on
8.3,so I don't actually dump any data; I'm *mostly* emulating the ability to dump data on just certain tables). 

So for what I'm doing, the ideal interface would be a way to tell pg_dump "When you're done dumping all table
structuresbut before you get to any constraints, please run $COMMAND and inject it's output into the dump output." For
someof the data obfuscation we're doing it would be easiest if $COMMAND was a perl script instead of SQL, but we could
probablyconvert it. 

Of course, many other folks actually need the ability to just spit out specific portions of the dump; I'm hoping we can
comeup with something that supports both concepts. 
--
Jim C. Nasby, Database Architect                   jim@nasby.net
512.569.9461 (cell)                         http://jim.nasby.net




pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: Inputting relative datetimes
Next
From: Daniel Farina
Date:
Subject: Cryptic error message in low-memory conditions