PG Bug reporting form <noreply@postgresql.org> writes:
> when creating a database in Postgres with the name e.g. "testDB", postgres
> creates a database in lowercase testdb.
> So far so good, but when trying to connect via psql and passing as database
> name "testDB" the connection fails, because it says the database does not
> exists.
> In my opinion, the libq library should also be case insensitive and
> automatically convert this to a lowercase "testdb" and not return an error.
Then it would become impossible to connect to databases that have
upper-case or mixed-case names.
Our general position on such matters is that automatic downcasing
happens in SQL commands, but not in any other context (such as
command-line arguments or connection strings).
regards, tom lane