0

I would like to unserstand why I am not able to drop a database from cmd: I execute the command: drop database if exists <db_name> but the result is as below:

postgres=# drop database testV5;

ERROR: database "testV5" does not exist

knowing that the database exists:

postgres=# \l
                                  Liste des bases de donnÚes

Nom | PropriÚtaire | Encodage | Collationnement | Type caract. | Droits d'accÞs testV4 | postgres | UTF8 | French_Canada.1252 | French_Canada.1252 | testV5 | postgres | UTF8 | French_Canada.1252 | French_Canada.1252 | postgres | postgres | UTF8 | French_Canada.1252 | French_Canada.1252 | template0| postgres | UTF8 | French_Canada.1252 | French_Canada.1252 |
template1| postgres | UTF8 | French_Canada.1252 | French_Canada.1252 |

Can anyone explain that please ? Thanks in advance.

Daniel Vérité
  • 32,662
  • 3
  • 78
  • 84
rainman
  • 205
  • 1
  • 4
  • 13

1 Answers1

1

You created the database with double quotes, so the name is case sensitive now. You need to use the dreaded double quotes when dropping the database as well:

drop database "testV5";

Note that using quoted identifiers is discouraged