pgsql: Adapt appendPsqlMetaConnect() to the new fmtId() encoding expect

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Adapt appendPsqlMetaConnect() to the new fmtId() encoding expect
Date: 2025-02-10 21:31:34
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9862de9176ef161e20a40f327afe18c6a11ecdcc

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

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2025-02-10 22:42:31 pgsql: Fix indentation of comment in plannodes.h
Previous Message Jeff Davis 2025-02-10 20:59:25 pgsql: Lock table in ShareUpdateExclusive when importing index stats.