drop database doesn't work

Started by Jerome Aletover 23 years ago3 messagesbugs
Jump to latest
#1Jerome Alet
alet@librelogiciel.com

============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : Jerome Alet
Your email address : alet@librelogiciel.com

System Configuration
---------------------
Architecture (example: Intel Pentium) : Intel Pentium II

Operating System (example: Linux 2.0.26 ELF) : Linux 2.4.18 ELF ext3fs

PostgreSQL version (example: PostgreSQL-7.2.1): PostgreSQL-7.2.1 (Debian Sid)

Compiler used (example: gcc 2.95.2) :

Please enter a FULL description of your problem:
------------------------------------------------

drop database doesn't really drop it.
if I drop a database and recreate a new one with the
same name, the old datas and base schema are still there
to annoy me.

Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------

Here's a sample psql session which shows the problem :

romans=# \connect template1 postgres
You are now connected to database template1 as user postgres.
template1=# drop database romans;
DROP DATABASE
template1=# \connect romans
FATAL 1: Database "romans" does not exist in the system catalog.
Previous connection kept
template1=# create database romans;
CREATE DATABASE
template1=# \connect romans postgres
You are now connected to database romans as user postgres.
romans=# \d
List of relations
Name | Type | Owner
-------------------+----------+----------
auteurs | table | postgres
auteurs_id_seq | sequence | postgres
...
(15 rows)

romans=#

If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jerome Alet (#1)
Re: drop database doesn't work

Jerome Alet <alet@librelogiciel.com> writes:

if I drop a database and recreate a new one with the
same name, the old datas and base schema are still there
to annoy me.

Looks to me like you created some stuff in template1. See

http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/managing-databases.html#MANAGE-AG-TEMPLATEDBS

regards, tom lane

#3Jerome Alet
alet@librelogiciel.com
In reply to: Tom Lane (#2)
Re: drop database doesn't work

On Tue, Jul 16, 2002 at 12:35:17PM -0400, Tom Lane wrote:

Jerome Alet <alet@librelogiciel.com> writes:

if I drop a database and recreate a new one with the
same name, the old datas and base schema are still there
to annoy me.

Looks to me like you created some stuff in template1. See

http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/managing-databases.html#MANAGE-AG-TEMPLATEDBS

That's it !

Thank you very much, and sorry for the false report.

Jerome Alet