Re: Schema-qualified statements in pg_dump output - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Schema-qualified statements in pg_dump output
Date
Msg-id 1216742300.3894.410.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Schema-qualified statements in pg_dump output  (Owen Hartnett <owen@clipboardinc.com>)
Responses Re: Schema-qualified statements in pg_dump output
Re: Schema-qualified statements in pg_dump output
List pgsql-hackers
On Mon, 2008-07-21 at 23:53 -0400, Owen Hartnett wrote:

> It would generate a schema dump where all the references to 
> <schema_name> were replaced by <masquerade_name>.

Good idea, can I tweak that a bit?

No need to specify the name at pg_dump time.

For text files, just use an option to specify whether we change the
actual schema name and replace it with the text :PGDUMPSCHEMA.
pg_dump --relocateable-schema (or alternate option name)

Then when we reload, we just run
psql -f pgdump.file -v PGDUMPSCHEMA=newlocation

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [patch] plproxy v2
Next
From: Markus Wanner
Date:
Subject: Re: Postgres-R: primary key patches