[ADMIN] create db from a template

2008-03-20 Thread Marc Fromm
Is there a better way to create a database from the schema of another database, to have a copy of a database without the data? 1.) I get the schema from a database pg_dump -s -U postgres -O databasename > /tmp/template_name 2.) I create a new database. createdb -U postgres newdb 3.) I restore th

Re: [ADMIN] create db from a template

2008-03-20 Thread Shane Ambler
Marc Fromm wrote: Is there a better way to create a database from the schema of another database, to have a copy of a database without the data? 1.) I get the schema from a database pg_dump -s -U postgres -O databasename > /tmp/template_name 2.) I create a new database. createdb -U postgres new