createdb compares strategy as case-sensitive

From: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: createdb compares strategy as case-sensitive
Date: 2024-04-20 20:03:12
Message-ID: 90c6913a-1dd2-42b4-8365-ce3b09c39b17@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

While doing some testing with createdb, I noticed it only accepts
file_copy/wal_log as valid strategies, not FILE_COPY/WAL_LOG (which is
what the docs say). The same thing applies to CREATE DATABASE.

The problem is that createdb() does the check using strcmp() which is
case-sensitive. IMHO this should do pg_strcasecmp() which is what we do
for other string parameters nearby.

Patch attached. This should be backpatched to 15, I think.

regards

--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment Content-Type Size
0001-createdb-compare-strategy-case-insensitive.patch text/x-patch 1.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-04-20 20:40:40 Re: createdb compares strategy as case-sensitive
Previous Message Tom Lane 2024-04-20 17:12:35 Re: Performance of JSON_TABLE vs jsonb_to_recordset