Re: New DBs from existing schemas - Mailing list pgsql-general

From Karsten Hilbert
Subject Re: New DBs from existing schemas
Date
Msg-id 20060525092227.GI7780@merkur.hilbert.loc
Whole thread Raw
In response to New DBs from existing schemas  (Nishad Prakash <prakashn@uci.edu>)
List pgsql-general
On Wed, May 24, 2006 at 04:14:46PM -0700, Nishad Prakash wrote:

> I want to create a new database with the exact schema of an existing one,
> but a different name.  After some reading, it seems
>
> pg_dump -s old_db > old_schema
> createdb -t old_schema new_db
Now new_db is a 1:1 copy of old_schema, triggers, data and
all. You may need to setup login permissins in pg_hba for
users to be able to connect to new_db.

Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

pgsql-general by date:

Previous
From: Rafal Pietrak
Date:
Subject: Re: background triggers?
Next
From: Tim Allen
Date:
Subject: Re: 8.1 on gentoo