Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ymlol-0007qw-VA for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Apr 2015 16:23:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Ymlol-0000Bc-6o for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Apr 2015 16:23:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Ymloj-0000BS-Ve for pgsql-bugs@postgresql.org; Mon, 27 Apr 2015 16:23:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Ymloc-0003IE-3e for pgsql-bugs@postgresql.org; Mon, 27 Apr 2015 16:23:33 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t3RGNMZo005325; Mon, 27 Apr 2015 12:23:22 -0400 From: Tom Lane To: cees.van.zeeland@xs4all.nl cc: pgsql-bugs@postgresql.org Subject: Re: BUG #13168: DROP DATABASE does not clean up all references In-reply-to: <20150426214657.2548.8172@wrigleys.postgresql.org> References: <20150426214657.2548.8172@wrigleys.postgresql.org> Comments: In-reply-to cees.van.zeeland@xs4all.nl message dated "Sun, 26 Apr 2015 21:46:57 -0000" Date: Mon, 27 Apr 2015 09:23:21 -0700 Message-ID: <1291.1430151801@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org cees.van.zeeland@xs4all.nl writes: > -- Follow the next steps to produce an unexpected error > -- The next 16 lines work fine > CREATE DATABASE new > WITH ENCODING='LATIN1' > TEMPLATE=template0 > LC_COLLATE='C' > LC_CTYPE='C' > CONNECTION LIMIT=-1; > DROP TABLE IF EXISTS category CASCADE; > CREATE TABLE category > ( > category_id SERIAL PRIMARY KEY > ,category_name varchar(30) NOT NULL > ,category_description varchar(200) NOT NULL > ); AFAICS you didn't reconnect to database "new", so table "category" is in whatever database you connected to originally. > DROP DATABASE new; If you had reconnected, it would not have allowed you to drop the current database ... regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs