Using drop database from psql - Mailing list pgsql-novice

From Lan Barnes
Subject Using drop database from psql
Date
Msg-id 20060127200753.GA10395@falleagle.net
Whole thread Raw
Responses Re: Using drop database from psql  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@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@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@falleagle.net
Linux Guy, SCM Specialist     858-354-0616

pgsql-novice by date:

Previous
From: Jaime Casanova
Date:
Subject: Re: Problema con postgresql 8.1.2
Next
From: Luzmar Caicedo Useche
Date:
Subject: Problem with pg_dump