pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: cees.van.zeeland@xs4all.nl
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #13168: DROP DATABASE does not clean up all references
Date: Mon, 27 Apr 2015 09:23:21 -0700
Message-ID: <1291.1430151801@sss.pgh.pa.us> (raw)
In-Reply-To: <20150426214657.2548.8172@wrigleys.postgresql.org>
References: <20150426214657.2548.8172@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

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



view thread (3+ messages)  latest in thread

Message-ID: <1291.1430151801@sss.pgh.pa.us>
Permalink:  ../1291.1430151801@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1291.1430151801@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, cees.van.zeeland@xs4all.nl
  Subject: Re: BUG #13168: DROP DATABASE does not clean up all references
  In-Reply-To: <1291.1430151801@sss.pgh.pa.us>
  References: <20150426214657.2548.8172@wrigleys.postgresql.org> <1291.1430151801@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox