Re: Using drop database from psql - Mailing list pgsql-novice

From Guido Barosio
Subject Re: Using drop database from psql
Date
Msg-id f7f6b4c70601271740j7be081a2hf83b9347d276241b@mail.gmail.com
Whole thread Raw
In response to Re: Using drop database from psql  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
Lan,

Beside Tom's comments, you won't be allowed to drop the database while you are working on it.
(no drop database will succceed if users are still working).  So, connect to template1 and fire the SQL with the quotes (dixit Tom Lane) or just use the dropdb command line tool


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

Regards,
Guido Barosio

On 1/27/06, Tom Lane <tgl@sss.pgh.pa.us > wrote:
Lan Barnes <lan@falleagle.net > writes:
> SCM=# drop database SCM;
> ERROR:  database "scm" does not exist

> Can anyone cast light on this?

Case-folding.  Within SQL you'd need to refer to that database as
"SCM" (with the double quotes).  We don't do case-folding for names
used on the shell command line, but within SQL this is per spec.  See
the last paragraphs in this section:
http://www.postgresql.org/docs/7.4/static/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org



--
/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Problem with pg_dump
Next
From: "Rolf Østvik"
Date:
Subject: Re: msysconf error