Re: duplicating a schema

From: Schwaighofer Clemens <clemens(dot)schwaighofer(at)tequila(dot)jp>
To: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: duplicating a schema
Date: 2009-12-01 02:39:06
Message-ID: fed954960911301839x6816916cq54da2161c0c3e935@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Nov 29, 2009 at 21:21, Ivan Sergio Borgonovo
<mail(at)webthatworks(dot)it> wrote:
> I need to create a new schema with all the content in an existing
> one, just with a new name.
>
> The way I've found is:
> - make a backup
> - load it in a dev box
> - rename the schema
> - make a backup of the new schema
> - restore the new schema on the original DB.
>
> Is there a more efficient approach?

Sadly no. With smaller DBs I do a sed on the dump ... wished there
would be a restore with not only a target DB but also a target schema.

--
★ Clemens 呉 Schwaighofer
★ IT Engineer/Web Producer/Planning
★ E-Graphics Communications SP Digital
★ 6-17-2 Ginza Chuo-ku, Tokyo 104-8167, JAPAN
★ Tel: +81-(0)3-3545-7706
★ Fax: +81-(0)3-3545-7343
http://www.e-gra.co.jp

This e-mail is intended only for the named person or entity to which
it is addressed and contains valuable business information that is
privileged, confidential and/or otherwise protected from disclosure.
If you received this e-mail in error, any review, use, dissemination,
distribution or copying of this e-mail is strictly prohibited.
Please notify us immediately of the error via e-mail to
disclaimer(at)tbwaworld(dot)com and please delete the e-mail from your system, retaining no copies in any media.
We appreciate your cooperation.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Smith 2009-12-01 03:33:06 Re: limiting resources to users
Previous Message Dennis Gearon 2009-12-01 02:02:33 using column as 'mutex'