Simon Riggs wrote:
> On Wed, 2008-02-06 at 16:41 +0100, Magnus Hagander wrote:
>
> I don't think the two syntaxes compete. I want to be able to say
> "everything before", "data" and "everything after" without having to
> remember to specify --what=tables,views,sequences,kitchensink etc.
> Especially since you probably won't notice you've missed out an object
> type (e.g. sequences) until you try to run an application. Too late!
Is this not a job for the -l / -L mode of pg_restore, but ported to pg_dump?
With a bit of tweaking ti the format you could do something like:
pg_dump -l mydb | grep BEFORE > obj_list.txt
pg_dump -L obj_list.txt mydb > mydb.before.schema
-- Richard Huxton Archonet Ltd