pgsql: In COPY FROM, fail cleanly when unsupported encoding conversion

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: In COPY FROM, fail cleanly when unsupported encoding conversion
Date: 2023-10-01 16:09:39
Message-ID: E1qmz0l-0070Lw-8C@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

In COPY FROM, fail cleanly when unsupported encoding conversion is needed.

In recent releases, such cases fail with "cache lookup failed for
function 0" rather than complaining that the conversion function
doesn't exist as prior versions did. Seems to be a consequence of
sloppy refactoring in commit f82de5c46. Add the missing error check.

Per report from Pierre Fortin. Back-patch to v14 where the
oversight crept in.

Discussion: https://postgr.es/m/20230929163739.3bea46e5.pfortin@pfortin.com

Branch
------
REL_16_STABLE

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

Modified Files
--------------
src/backend/commands/copyfrom.c | 6 ++++++
1 file changed, 6 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2023-10-01 17:19:54 pgsql: Fix datalen calculation in tsvectorrecv().
Previous Message Andrew Dunstan 2023-10-01 14:25:59 pgsql: Only evaluate default values as required when doing COPY FROM