pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix plperl to handle non-ASCII error message texts correctly. 6+ messages / 1 participants [nested] [flat]
* pgsql: Fix plperl to handle non-ASCII error message texts correctly. @ 2015-09-29 14:52 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2015-09-29 14:52 UTC (permalink / raw) To: pgsql-committers Fix plperl to handle non-ASCII error message texts correctly. We were passing error message texts to croak() verbatim, which turns out not to work if the text contains non-ASCII characters; Perl mangles their encoding, as reported in bug #13638 from Michal Leinweber. To fix, convert the text into a UTF8-encoded SV first. It's hard to test this without risking failures in different database encodings; but we can follow the lead of plpython, which is already assuming that no-break space (U+00A0) has an equivalent in all encodings we care about running the regression tests in (cf commit 2dfa15de5). Back-patch to 9.1. The code is quite different in 9.0, and anyway it seems too risky to put something like this into 9.0's final minor release. Alex Hunsaker, with suggestions from Tim Bunce and Tom Lane Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/b62c870ff1774c98865a930f2f0a09544e11d2e5 Modified Files -------------- src/pl/plperl/SPI.xs | 2 +- src/pl/plperl/Util.xs | 2 +- src/pl/plperl/expected/plperl_elog.out | 13 ++++++++++ src/pl/plperl/expected/plperl_elog_1.out | 13 ++++++++++ src/pl/plperl/plperl.c | 12 +++++----- src/pl/plperl/plperl_helpers.h | 38 ++++++++++++++++++++++++++++++ src/pl/plperl/sql/plperl_elog.sql | 15 ++++++++++++ 7 files changed, 87 insertions(+), 8 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix plperl to handle non-ASCII error message texts correctly. @ 2015-09-29 14:52 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2015-09-29 14:52 UTC (permalink / raw) To: pgsql-committers Fix plperl to handle non-ASCII error message texts correctly. We were passing error message texts to croak() verbatim, which turns out not to work if the text contains non-ASCII characters; Perl mangles their encoding, as reported in bug #13638 from Michal Leinweber. To fix, convert the text into a UTF8-encoded SV first. It's hard to test this without risking failures in different database encodings; but we can follow the lead of plpython, which is already assuming that no-break space (U+00A0) has an equivalent in all encodings we care about running the regression tests in (cf commit 2dfa15de5). Back-patch to 9.1. The code is quite different in 9.0, and anyway it seems too risky to put something like this into 9.0's final minor release. Alex Hunsaker, with suggestions from Tim Bunce and Tom Lane Branch ------ REL9_3_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/f60b2e2d48976b71a47505b24468617886ac1a31 Modified Files -------------- src/pl/plperl/SPI.xs | 2 +- src/pl/plperl/Util.xs | 2 +- src/pl/plperl/expected/plperl_elog.out | 13 ++++++++++ src/pl/plperl/expected/plperl_elog_1.out | 13 ++++++++++ src/pl/plperl/plperl.c | 12 +++++----- src/pl/plperl/plperl_helpers.h | 38 ++++++++++++++++++++++++++++++ src/pl/plperl/sql/plperl_elog.sql | 15 ++++++++++++ 7 files changed, 87 insertions(+), 8 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix plperl to handle non-ASCII error message texts correctly. @ 2015-09-29 14:52 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2015-09-29 14:52 UTC (permalink / raw) To: pgsql-committers Fix plperl to handle non-ASCII error message texts correctly. We were passing error message texts to croak() verbatim, which turns out not to work if the text contains non-ASCII characters; Perl mangles their encoding, as reported in bug #13638 from Michal Leinweber. To fix, convert the text into a UTF8-encoded SV first. It's hard to test this without risking failures in different database encodings; but we can follow the lead of plpython, which is already assuming that no-break space (U+00A0) has an equivalent in all encodings we care about running the regression tests in (cf commit 2dfa15de5). Back-patch to 9.1. The code is quite different in 9.0, and anyway it seems too risky to put something like this into 9.0's final minor release. Alex Hunsaker, with suggestions from Tim Bunce and Tom Lane Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/b631a46ed83b7eebf5cde16b41d842596cbcc69d Modified Files -------------- src/pl/plperl/SPI.xs | 2 +- src/pl/plperl/Util.xs | 2 +- src/pl/plperl/expected/plperl_elog.out | 13 ++++++++++ src/pl/plperl/expected/plperl_elog_1.out | 13 ++++++++++ src/pl/plperl/plperl.c | 12 +++++----- src/pl/plperl/plperl_helpers.h | 38 ++++++++++++++++++++++++++++++ src/pl/plperl/sql/plperl_elog.sql | 15 ++++++++++++ 7 files changed, 87 insertions(+), 8 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix plperl to handle non-ASCII error message texts correctly. @ 2015-09-29 14:52 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2015-09-29 14:52 UTC (permalink / raw) To: pgsql-committers Fix plperl to handle non-ASCII error message texts correctly. We were passing error message texts to croak() verbatim, which turns out not to work if the text contains non-ASCII characters; Perl mangles their encoding, as reported in bug #13638 from Michal Leinweber. To fix, convert the text into a UTF8-encoded SV first. It's hard to test this without risking failures in different database encodings; but we can follow the lead of plpython, which is already assuming that no-break space (U+00A0) has an equivalent in all encodings we care about running the regression tests in (cf commit 2dfa15de5). Back-patch to 9.1. The code is quite different in 9.0, and anyway it seems too risky to put something like this into 9.0's final minor release. Alex Hunsaker, with suggestions from Tim Bunce and Tom Lane Branch ------ REL9_1_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/ca6c2f863b0d8c1a986b9d1967e7b59e3fbf8321 Modified Files -------------- src/pl/plperl/SPI.xs | 2 +- src/pl/plperl/Util.xs | 2 +- src/pl/plperl/expected/plperl_elog.out | 13 ++++++++++ src/pl/plperl/expected/plperl_elog_1.out | 13 ++++++++++ src/pl/plperl/plperl.c | 12 +++++----- src/pl/plperl/plperl_helpers.h | 38 ++++++++++++++++++++++++++++++ src/pl/plperl/sql/plperl_elog.sql | 15 ++++++++++++ 7 files changed, 87 insertions(+), 8 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix plperl to handle non-ASCII error message texts correctly. @ 2015-09-29 14:52 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2015-09-29 14:52 UTC (permalink / raw) To: pgsql-committers Fix plperl to handle non-ASCII error message texts correctly. We were passing error message texts to croak() verbatim, which turns out not to work if the text contains non-ASCII characters; Perl mangles their encoding, as reported in bug #13638 from Michal Leinweber. To fix, convert the text into a UTF8-encoded SV first. It's hard to test this without risking failures in different database encodings; but we can follow the lead of plpython, which is already assuming that no-break space (U+00A0) has an equivalent in all encodings we care about running the regression tests in (cf commit 2dfa15de5). Back-patch to 9.1. The code is quite different in 9.0, and anyway it seems too risky to put something like this into 9.0's final minor release. Alex Hunsaker, with suggestions from Tim Bunce and Tom Lane Branch ------ REL9_2_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/aae40cf13b9b1b250db4a29e043e019fe85b0522 Modified Files -------------- src/pl/plperl/SPI.xs | 2 +- src/pl/plperl/Util.xs | 2 +- src/pl/plperl/expected/plperl_elog.out | 13 ++++++++++ src/pl/plperl/expected/plperl_elog_1.out | 13 ++++++++++ src/pl/plperl/plperl.c | 12 +++++----- src/pl/plperl/plperl_helpers.h | 38 ++++++++++++++++++++++++++++++ src/pl/plperl/sql/plperl_elog.sql | 15 ++++++++++++ 7 files changed, 87 insertions(+), 8 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix plperl to handle non-ASCII error message texts correctly. @ 2015-09-29 14:52 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2015-09-29 14:52 UTC (permalink / raw) To: pgsql-committers Fix plperl to handle non-ASCII error message texts correctly. We were passing error message texts to croak() verbatim, which turns out not to work if the text contains non-ASCII characters; Perl mangles their encoding, as reported in bug #13638 from Michal Leinweber. To fix, convert the text into a UTF8-encoded SV first. It's hard to test this without risking failures in different database encodings; but we can follow the lead of plpython, which is already assuming that no-break space (U+00A0) has an equivalent in all encodings we care about running the regression tests in (cf commit 2dfa15de5). Back-patch to 9.1. The code is quite different in 9.0, and anyway it seems too risky to put something like this into 9.0's final minor release. Alex Hunsaker, with suggestions from Tim Bunce and Tom Lane Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/a16b9b19389d1832286f4d8f259dab0d5be88856 Modified Files -------------- src/pl/plperl/SPI.xs | 2 +- src/pl/plperl/Util.xs | 2 +- src/pl/plperl/expected/plperl_elog.out | 13 ++++++++++ src/pl/plperl/expected/plperl_elog_1.out | 13 ++++++++++ src/pl/plperl/plperl.c | 12 +++++----- src/pl/plperl/plperl_helpers.h | 38 ++++++++++++++++++++++++++++++ src/pl/plperl/sql/plperl_elog.sql | 15 ++++++++++++ 7 files changed, 87 insertions(+), 8 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2015-09-29 14:52 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-09-29 14:52 pgsql: Fix plperl to handle non-ASCII error message texts correctly. Tom Lane <tgl@sss.pgh.pa.us> 2015-09-29 14:52 pgsql: Fix plperl to handle non-ASCII error message texts correctly. Tom Lane <tgl@sss.pgh.pa.us> 2015-09-29 14:52 pgsql: Fix plperl to handle non-ASCII error message texts correctly. Tom Lane <tgl@sss.pgh.pa.us> 2015-09-29 14:52 pgsql: Fix plperl to handle non-ASCII error message texts correctly. Tom Lane <tgl@sss.pgh.pa.us> 2015-09-29 14:52 pgsql: Fix plperl to handle non-ASCII error message texts correctly. Tom Lane <tgl@sss.pgh.pa.us> 2015-09-29 14:52 pgsql: Fix plperl to handle non-ASCII error message texts correctly. Tom Lane <tgl@sss.pgh.pa.us>
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