Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 9F936633269 for ; Tue, 20 Apr 2010 13:26:04 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 97599-02-9 for ; Tue, 20 Apr 2010 16:25:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd-17937.dedibox.fr (sd-17937.dedibox.fr [88.191.100.74]) by mail.postgresql.org (Postfix) with ESMTP id 970AD6365CB for ; Tue, 20 Apr 2010 13:00:13 -0300 (ADT) Received: from [192.168.10.3] (ASte-Genev-Bois-153-1-66-42.w86-198.abo.wanadoo.fr [86.198.36.42]) by sd-17937.dedibox.fr (Postfix) with ESMTPA id B3F153B8F5; Tue, 20 Apr 2010 18:00:12 +0200 (CEST) Message-ID: <4BCDCF8C.9030306@lelarge.info> Date: Tue, 20 Apr 2010 18:00:12 +0200 From: Guillaume Lelarge User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: Mitch Collinsworth CC: pgsql-admin@postgresql.org Subject: Re: drop database / create database / data still here ? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201004/287 X-Sequence-Number: 34381 Le 13/04/2010 20:16, Mitch Collinsworth a écrit : > [...] > 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 *.* > List of relations > Schema | Name | Type | Owner > --------------------+--------------------------------+-------+---------- > accmgr | acct_rate | table | accmgr > accmgr | acct_rate_working | table | accmgr > accmgr | acct_sum | table | accmgr > accmgr | acct_sum_raw | table | accmgr > accmgr | acct_sum_whatif | table | accmgr > accmgr | acct_sum_working | table | accmgr > accmgr | acct_temp | table | accmgr > accmgr | eq_rate | table | accmgr > accmgr | eq_rate_working | table | accmgr > accmgr | inventory_rate | table | accmgr > accmgr | inventory_rate_working | table | accmgr > accmgr | inventory_surcharge | table | accmgr > ... > (115 rows) > > And likewise, select will pull up data from what I thought was a > brand new, empty database. The coral server was stopped before I > did this so there should have been no active connections at the > time. > > This is with: > > PostgreSQL 8.1.18 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC) > 4.1.2 20080704 (Red Hat 4.1.2-46) > The only reason I found is that the template1 database already have these objects. Can you connect to template1 and try \dt ? -- Guillaume. http://www.postgresqlfr.org http://dalibo.com