pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix COPY FROM when database encoding is SQL_ASCII. 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix COPY FROM when database encoding is SQL_ASCII. @ 2022-05-29 21:08 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 2+ messages in thread From: Heikki Linnakangas @ 2022-05-29 21:08 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix COPY FROM when database encoding is SQL_ASCII. In the codepath when no encoding conversion is required, the check for incomplete character at the end of input incorrectly used server encoding's max character length, instead of the client's. Usually the server and client encodings are the same when we're not performing encoding conversion, but SQL_ASCII is an exception. In the passing, also fix some outdated comments that still talked about the old COPY protocol. It was removed in v14. Per bug #17501 from Vitaly Voronov. Backpatch to v14 where this was introduced. Discussion: https://www.postgresql.org/message-id/17501-128b1dd039362ae6@postgresql.org Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f82595ac903e4e4062d909e73693dd809c6845c0 Modified Files -------------- src/backend/commands/copyfromparse.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix COPY FROM when database encoding is SQL_ASCII. @ 2022-05-29 21:08 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 2+ messages in thread From: Heikki Linnakangas @ 2022-05-29 21:08 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix COPY FROM when database encoding is SQL_ASCII. In the codepath when no encoding conversion is required, the check for incomplete character at the end of input incorrectly used server encoding's max character length, instead of the client's. Usually the server and client encodings are the same when we're not performing encoding conversion, but SQL_ASCII is an exception. In the passing, also fix some outdated comments that still talked about the old COPY protocol. It was removed in v14. Per bug #17501 from Vitaly Voronov. Backpatch to v14 where this was introduced. Discussion: https://www.postgresql.org/message-id/17501-128b1dd039362ae6@postgresql.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/fc36ac52ebd3b0c879877c424f94318728b25935 Modified Files -------------- src/backend/commands/copyfromparse.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2022-05-29 21:08 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-05-29 21:08 pgsql: Fix COPY FROM when database encoding is SQL_ASCII. Heikki Linnakangas <heikki.linnakangas@iki.fi> 2022-05-29 21:08 pgsql: Fix COPY FROM when database encoding is SQL_ASCII. Heikki Linnakangas <heikki.linnakangas@iki.fi>
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