Re: drop database / create database / data still here ?
От | Bruce Momjian |
---|---|
Тема | Re: drop database / create database / data still here ? |
Дата | |
Msg-id | 201004201525.o3KFP7p20556@momjian.us обсуждение исходный текст |
Ответ на | drop database / create database / data still here ? (Mitch Collinsworth <mitch@ccmr.cornell.edu>) |
Список | pgsql-admin |
Mitch Collinsworth wrote: > > Hi Folks, > > I thought I understood how this worked, but now it's baffling me. > I want to drop a database named coral from my test server and load > a fresh dump of it from my production server. This has worked when > I've done it before, but now it's giving me fits. Here's an > example: > > coral=# \c postgres > You are now connected to database "postgres". > postgres=# drop database coral; > DROP DATABASE > postgres=# create database coral; > CREATE DATABASE > postgres=# \c coral > You are now connected to database "coral". > coral=# \dt *.* The problem is that you have created these tables in the 'template1' database, and they are getting copied from there everytime you create a new database. FYI, you can also use another database as the template database if you wish. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com
В списке pgsql-admin по дате отправления: