Re: Schema-qualified statements in pg_dump output

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Owen Hartnett <owen(at)clipboardinc(dot)com>
Cc: Bernd Helmle <mailings(at)oopsware(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Schema-qualified statements in pg_dump output
Date: 2008-07-22 15:58:20
Message-ID: 1216742300.3894.410.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.com
PostgreSQL Training, Services and Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-07-22 16:03:25 Re: [PATCHES] GIN improvements
Previous Message Marko Kreen 2008-07-22 15:47:24 Re: [patch] plproxy v2