From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Forest W Felling <res08i7v(at)verizon(dot)net> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Drop Database |
Date: | 2003-01-19 16:17:32 |
Message-ID: | 440.1042993052@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Forest W Felling <res08i7v(at)verizon(dot)net> writes:
> I can not find an explanation to help me understand why
> mydb=# drop database November;
> fails, while
> [Forest-Fellings-Computer:~] dropdb -i -e November
> succeeds.
In the SQL command, you need
drop database "November";
See the User's Guide's discussion of identifiers, particularly
case-folding and quoting.
Our command-line tools generally double-quote whatever they find
on their command lines, so that what dropdb sent to the server
was in fact DROP DATABASE "November". This makes their behavior a
little inconsistent compared to raw SQL, but the other way proved
too unwieldy because of shell quoting rules. If dropdb did not supply
double quotes then you'd have had to type something like
dropdb '"November"'
which is awfully tedious.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Le Mar Davidson | 2003-01-19 23:40:32 | Initial Postgresql password |
Previous Message | Forest Felling | 2003-01-19 14:49:00 | Drop Database |