Re: V7.4.2: drop database does not drop schemas/table/data - Mailing list pgsql-bugs

From Tom Lane
Subject Re: V7.4.2: drop database does not drop schemas/table/data
Date
Msg-id 12423.1084304217@sss.pgh.pa.us
Whole thread Raw
In response to V7.4.2: drop database does not drop schemas/table/data  (Rachel Willmer <rachel@willmer.com>)
Responses Re: V7.4.2: drop database does not drop schemas/table/data  (Rachel Willmer <rachel@willmer.com>)
List pgsql-bugs
Rachel Willmer <rachel@willmer.com> writes:
> DROP DATABASE testdb;
> CREATE DATABASE testdb;

> Database appears again. But so does the schema 'edinburgh', all its
> tables, views, data, etc.

Sounds like you created all that stuff in template1, and so it's being
copied into the new database.  Read about template databases:
http://www.postgresql.org/docs/7.4/static/manage-ag-templatedbs.html

If you decide you want to rebuild template1 without re-initdb'ing,
there's a recipe somewhere on the techdocs site --- it's not quite
a trivial thing to do.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1150: grant options not properly checked
Next
From: Tom Lane
Date:
Subject: Re: Bug in backend/lib/stringinfo.c:enlargeStringInfo()