Re: Copy Schema

From: "Derrick Betts" <derrick(at)blueaxis(dot)com>
To: "Michael Glaesemann" <grzm(at)seespotcode(dot)net>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Copy Schema
Date: 2006-07-28 14:01:39
Message-ID: 067001c6b24e$5cb2e920$0202a8c0@main
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I know how to create new databases by using the template1 already. I want
to create new schemas with the requirements outlined in the original email.
Any thoughts?

Derrick

----- Original Message -----
From: "Michael Glaesemann" <grzm(at)seespotcode(dot)net>
To: "Derrick Betts" <derrick(at)blueaxis(dot)com>
Cc: <pgsql-novice(at)postgresql(dot)org>
Sent: Friday, July 28, 2006 12:22 AM
Subject: Re: [NOVICE] Copy Schema

>
> On Jul 28, 2006, at 14:09 , Derrick Betts wrote:
>
>> Is there a way to create a "template" schema, similar to modifying the
>> template1 to use for new database creation?
>
> Certainly. Any database can be used as a template. template1 is used by
> default. Check out the CREATE DATABASE docs:
>
> http://www.postgresql.org/docs/current/interactive/sql-
> createdatabase.html
>
>> I read that there is a way to restore a schema with pg_restore command.
>> Is the best or only way to accomplish this?
>
> Well, if you haven't loaded data into a database you want to use as a
> template (or it only has data you want to include in the new database),
> you can use CREATE DATABASE as well.
>
> Hope this helps.
>
> Michael Glaesemann
> grzm seespotcode net
>
>
>
>

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Keith Worthington 2006-07-28 16:28:32 Re: Copy Schema
Previous Message Kaloyan Iliev 2006-07-28 13:33:59 Tables Locks Quetion or Strictlly subsequent numbers