Skip site navigation (1) Skip section navigation (2)

Re: Copy Schema

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: "Derrick Betts" <derrick(at)blueaxis(dot)com>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Copy Schema
Date: 2006-07-28 06:22:10
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
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: 

> 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

  • Copy Schema at 2006-07-28 05:09:32 from Derrick Betts


pgsql-novice by date

Next:From: A. KretschmerDate: 2006-07-28 06:39:44
Subject: Re: Copy Schema
Previous:From: Derrick BettsDate: 2006-07-28 05:09:32
Subject: Copy Schema

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group