PostgreSQL is not consistent in the way it uses upper/lower case to create databases and access it.
Why psql -c 'CREATE DATABASE name_db' uses lower(name_db) an less the name is enclosed by "" but psql name_db ?
Take a look ....
psql template1 -c "create database MYDB" psql MYDB
psql: FATAL 1: Database "MYDB" does not exist in the system catalog.
Jo
---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?
http://archives.postgresql.org