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

From Robert Haas
Subject Re: pg_restore --no-post-data and --post-data-only
Date
Msg-id CA+TgmoaW3-WfgBzXsFrPpFFWcAqisSXsa=y3hRGaTN16Ya5kAA@mail.gmail.com
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
Re: pg_restore --no-post-data and --post-data-only
List pgsql-hackers
On Fri, Aug 26, 2011 at 11:22 AM, Andrew Dunstan <andrew@dunslane.net> wrote:
>> But we could also add these switches to pg_dump too if people feel it's
>> worthwhile. I haven't looked but the logic should not be terribly hard.
>
> Something like the attached, in fact, which seems pretty simple.

It seems like there are three sets of things you might want here:
pre-data, data, post-data.  So in the end we could end up with:

--pre-data-only
--post-data-only
--data-only
--no-pre-data
--no-post-data
--no-data

And then maybe someone will want just the create index commands and
not the constraint commands.  It seems like it might be more elegant
to come up with a single switch where you can list which things you
want:

--sections='predata data'
--sections='postdata'
--sections='index'

Just thinking out loud....

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: Re: [GENERAL] pg_upgrade problem
Next
From: Jeff Davis
Date:
Subject: Re: pg_restore --no-post-data and --post-data-only