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

From: Japin Li <japinli(at)hotmail(dot)com>
To: 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 09:11:10
Message-ID: MEYP282MB1669DC75FDBA257B834C52B4B6119@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


On Fri, 16 Jul 2021 at 06:04, PG Bug reporting form <noreply(at)postgresql(dot)org> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 17111
> Logged by: Bernaridho Hutabarat
> Email address: bernaridho(at)outlook(dot)co(dot)id
> PostgreSQL version: 12.7
> Operating system: CentOS
> Description:
>
> postgres=# \c Database
> FATAL: database "Database" does not exist
> Previous connection kept
> postgres=# CREATE DATABASE Database;
> ERROR: database "database" already exists
> postgres=# DROP DATABASE Database;
> DROP DATABASE
> postgres=# CREATE DATABASE Database OWNER ServiceUser1;
> CREATE DATABASE
> postgres=# \c Database;
> FATAL: database "Database" does not exist
> Previous connection kept
> postgres=# DROP DATABASE Database;
> DROP DATABASE
> postgres=# CREATE DATABASE Database OWNER postgres;
> CREATE DATABASE
> postgres=# \c Database;
> FATAL: database "Database" does not exist
> Previous connection kept
> postgres=# DROP DATABASE Database;
> DROP DATABASE
> postgres=# \q

This might be the \c command doesn't convert "Database" to "database",
OTOH, the CREATE DATABASE & DROP DATABASE convert "Database" to "database" by default.

Should we convert the string to lower case read_connect_arg() if it doesn't quoted?

--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Francisco Olarte 2021-07-16 09:22:24 Re: BUG #17112: Sequence number is not restored when the stored procedure ends abnormally
Previous Message Sergei Kornilov 2021-07-16 07:59:20 Re: BUG #17112: Sequence number is not restored when the stored procedure ends abnormally