Re: BUG #17111: Database created, cannot be created, but reported as inexist

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Japin Li <japinli(at)hotmail(dot)com>
Cc: bernaridho(at)outlook(dot)co(dot)id, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17111: Database created, cannot be created, but reported as inexist
Date: 2021-07-16 17:56:23
Message-ID: 3745704.1626458183@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Japin Li <japinli(at)hotmail(dot)com> writes:
> Can we remove the code for compatibility with 7.2 or older?

I'm kind of inclined not to, because most other ways that you can
specify a database name for a connection also don't downcase.

$ psql Postgres
psql: error: connection to server on socket "/tmp/.s.PGSQL.5440" failed: FATAL: database "Postgres" does not exist

$ psql postgres
...
postgres=# \c "dbname=Postgres"
connection to server on socket "/tmp/.s.PGSQL.5440" failed: FATAL: database "Postgres" does not exist
Previous connection kept

This largely stems from an ancient decision that we shouldn't
auto-downcase names coming from a program's command line.
The interaction of SQL and shell quoting conventions is messy
enough that specifying a non-lower-case database, user, etc name
would be pretty annoying if we did do that.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jacob Champion 2021-07-16 18:02:18 Re: pg_upgrade test for binary compatibility of core data types
Previous Message Jacob Champion 2021-07-16 16:40:34 Re: pg_upgrade test for binary compatibility of core data types