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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, 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 00:11:09
Message-ID: 477092.1732234269@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> But the logic doesn't make sense. Why would two bytes be any different
> than one? I assumed you would just remove all trailing high-bit bytes
> and stop and the first non-high-bit byte.

To take the most obvious counterexample: what if the name contains
*only* high-bit-set bytes? In any case, this logic must achieve
the same effect as the original encoding-aware truncation, which
will not have removed more than it absolutely had to.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Munro 2024-11-22 02:51:33 Re: BUG #18610: llvm error: __aarch64_swp4_acq_rel which could not be resolved
Previous Message Nathan Bossart 2024-11-21 18:14:47 Re: BUG #18711: Attempting a connection with a database name longer than 63 characters now fails