Re: [GENERAL] New DBs from existing schemas

2006-05-25 Thread Karsten Hilbert
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_sche

Re: [GENERAL] New DBs from existing schemas

2006-05-24 Thread Chris
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 That will dump all schemas from that db. If you only want a particular schema, use '-n'. createdb -t old_schema

[GENERAL] New DBs from existing schemas

2006-05-24 Thread Nishad Prakash
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 should work. Will it? Note that old_db has lots of stored functions and user-defined operators in addition