pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: John Naylor <johncnaylorls@gmail.com>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: Nathan Bossart <nathandbossart@gmail.com>
Cc: adam@labkey.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18711: Attempting a connection with a database name longer than 63 characters now fails
Date: Thu, 21 Nov 2024 23:53:49 -0500
Message-ID: <509656.1732251229@sss.pgh.pa.us> (raw)
In-Reply-To: <CANWCAZZvVYz7ZVoOMnzoXXU=HM7HT6iVvFqsSwtcZ0tfbe3rZA@mail.gmail.com>
References: <Zz0WPCEzx-mPvUxA@nathan>
	<3976665.1732057784@sss.pgh.pa.us>
	<Zz1bvchIEQPT6eTr@nathan>
	<75265.1732076593@sss.pgh.pa.us>
	<Zz4BxVqAZnWHFXFB@nathan>
	<154104.1732118090@sss.pgh.pa.us>
	<Zz4IJ041indld9jv@nathan>
	<158506.1732120196@sss.pgh.pa.us>
	<Zz4TcYSNWW1_Vj--@nathan>
	<Zz5kfP7fIuoY8I45@nathan>
	<Zz7g2s0GSBelWmpg@ip-10-97-1-34.eu-west-3.compute.internal>
	<CANWCAZZvVYz7ZVoOMnzoXXU=HM7HT6iVvFqsSwtcZ0tfbe3rZA@mail.gmail.com>

John Naylor <johncnaylorls@gmail.com> writes:
> On Thu, Nov 21, 2024 at 2:27 PM Bertrand Drouvot
> <bertranddrouvot.pg@gmail.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.

Shift JIS is not an allowed server-side encoding, for precisely
that reason.  This whole proposal is based on the assumption that
the string we need to match in pg_database is valid in some
server-side encoding.

			regards, tom lane





view thread (67+ messages)  latest in thread

Message-ID: <509656.1732251229@sss.pgh.pa.us>
Permalink:  ../509656.1732251229@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/509656.1732251229@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, johncnaylorls@gmail.com, bertranddrouvot.pg@gmail.com, nathandbossart@gmail.com, adam@labkey.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18711: Attempting a connection with a database name longer than 63 characters now fails
  In-Reply-To: <509656.1732251229@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