Re: How to copy a schema under another name in same database - Mailing list pgsql-novice

From Frank Bax
Subject Re: How to copy a schema under another name in same database
Date
Msg-id 48909BFB.1000904@sympatico.ca
Whole thread Raw
In response to How to copy a schema under another name in same database  ("Daniel Gour" <Daniel.Gour@adacel.com>)
List pgsql-novice
Daniel Gour wrote:
> Hello!  I have a PostgreSQL (8.3.3, WinXP + linux) database with
> multiple schemas.  I would like, on a regular basis, to be able to copy
> the structure and data of one schema under a new schema, using of course
> a different name.  What would be the easiest way?



Backup the schema with pg_dump; edit file; change schema name and
restore?  If schema names do not show up in data; then this might work:

pg_dump ... | sed s:schema1:schema2:g | psql


pgsql-novice by date:

Previous
From: "Obe, Regina"
Date:
Subject: Re: How to copy a schema under another name in same database
Next
From: "Daniel Gour"
Date:
Subject: Re: How to copy a schema under another name in same database