pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Adapt appendPsqlMetaConnect() to the new fmtId() encoding expect
Date: Mon, 10 Feb 2025 21:31:34 +0000
Message-ID: <E1thbNO-006Qtg-6r@gemulon.postgresql.org> (raw)

Adapt appendPsqlMetaConnect() to the new fmtId() encoding expectations.

We need to tell fmtId() what encoding to assume, but this function
doesn't know that.  Fortunately we can fix that without changing the
function's API, because we can just use SQL_ASCII.  That's because
database names in connection requests are effectively binary not text:
no encoding-aware processing will happen on them.

This fixes XversionUpgrade failures seen in the buildfarm.  The
alternative of having pg_upgrade use setFmtEncoding() is unappetizing,
given that it's connecting to multiple databases that may have
different encodings.

Andres Freund, Noah Misch, Tom Lane

Security: CVE-2025-1094

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f9fceef6ee020717ffbd18cfaa0b77e583348734

Modified Files
--------------
src/fe_utils/string_utils.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1thbNO-006Qtg-6r@gemulon.postgresql.org>
Permalink:  ../E1thbNO-006Qtg-6r@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1thbNO-006Qtg-6r@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Adapt appendPsqlMetaConnect() to the new fmtId() encoding expect
  In-Reply-To: <E1thbNO-006Qtg-6r@gemulon.postgresql.org>

* 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