pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Japin Li <japinli@hotmail.com>
Cc: bernaridho@outlook.co.id
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17111: Database created, cannot be created, but reported as inexist
Date: Fri, 16 Jul 2021 13:56:23 -0400
Message-ID: <3745704.1626458183@sss.pgh.pa.us> (raw)
In-Reply-To: <MEYP282MB16692D00512B089AC7FEC5D8B6119@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM>
References: <17111-c66d4212978a0260@postgresql.org>
	<MEYP282MB1669DC75FDBA257B834C52B4B6119@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM>
	<MEYP282MB16692D00512B089AC7FEC5D8B6119@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM>

Japin Li <japinli@hotmail.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





view thread (6+ messages)  latest in thread

Message-ID: <3745704.1626458183@sss.pgh.pa.us>
Permalink:  ../3745704.1626458183@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3745704.1626458183@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, japinli@hotmail.com, bernaridho@outlook.co.id, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17111: Database created, cannot be created, but reported as inexist
  In-Reply-To: <3745704.1626458183@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox