Using drop database from psql

From: Lan Barnes <lan(at)falleagle(dot)net>
To: Postgres Newbie <pgsql-novice(at)postgresql(dot)org>
Subject: Using drop database from psql
Date: 2006-01-27 20:07:53
Message-ID: 20060127200753.GA10395@falleagle.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

When I try to drop a database, whether I have opened it or some other
database, I get told it doesn't exist. The message changes the case of
the database name, but that may be a feature of SQL.

They system is a Fedore Core 3 server running
postgresql-server-7.4.6-1.FC3.1.

Here is the output:

[postgres(at)oz ~]$ psql -d template1
Welcome to psql 7.4.6, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

template1=# \l
List of databases
Name | Owner | Encoding
-----------+----------+-----------
SCM | postgres | SQL_ASCII
SCMTST | lbarnes | SQL_ASCII
template0 | postgres | SQL_ASCII
template1 | postgres | SQL_ASCII
(4 rows)

template1=# \q
[postgres(at)oz ~]$ psql -d SCM
Welcome to psql 7.4.6, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

SCM=# drop database SCM;
ERROR: database "scm" does not exist

Can anyone cast light on this? The database is empty, and I want to
recreate it with a different owner (which may be a task more easily done
with some other method).

--
Lan Barnes lan(at)falleagle(dot)net
Linux Guy, SCM Specialist 858-354-0616

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2006-01-27 20:33:25 Re: Using drop database from psql
Previous Message Jaime Casanova 2006-01-27 20:01:15 Re: Problema con postgresql 8.1.2