How to Drop/Create Database name that has upper-case letter?

SQL identifiers that are case-sensitive need to be enclosed in double quotes:

DROP DATABASE  "Ajp";

Not sure if they are properly preserved on Windows if you pass them through the commandline though.

You might need to put that into a SQL script and pass the script name to psql.

For details on valid identifiers please see the manual: http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS

Leave a Comment

tech