Re: V7.4.2: drop database does not drop schemas/table/data

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rachel Willmer <rachel(at)willmer(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: V7.4.2: drop database does not drop schemas/table/data
Date: 2004-05-11 19:36:57
Message-ID: 12423.1084304217@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Rachel Willmer <rachel(at)willmer(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2004-05-11 20:10:19 Re: Bug in backend/lib/stringinfo.c:enlargeStringInfo()
Previous Message Tom Lane 2004-05-11 19:32:04 Re: BUG #1150: grant options not properly checked