Re: BUG #18711: Attempting a connection with a database name longer than 63 characters now fails

From: John Naylor <johncnaylorls(at)gmail(dot)com>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, adam(at)labkey(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18711: Attempting a connection with a database name longer than 63 characters now fails
Date: 2024-11-22 04:39:15
Message-ID: CANWCAZZvVYz7ZVoOMnzoXXU=HM7HT6iVvFqsSwtcZ0tfbe3rZA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Nov 21, 2024 at 2:27 PM Bertrand Drouvot
<bertranddrouvot(dot)pg(at)gmail(dot)com> wrote:

+ /*
+ * If the original name is too long and we see two consecutive bytes
+ * with their high bits set at the truncation point, we might have
+ * truncated in the middle of a multibyte character. In multibyte
+ * encodings, every byte of a multibyte character has its high bit
+ * set.

Counterexample: Shift JIS -- I don't think we can short-circuit the full check.

--
John Naylor
Amazon Web Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2024-11-22 04:53:49 Re: BUG #18711: Attempting a connection with a database name longer than 63 characters now fails
Previous Message Thomas Munro 2024-11-22 02:51:33 Re: BUG #18610: llvm error: __aarch64_swp4_acq_rel which could not be resolved