Skip site navigation (1) Skip section navigation (2)

pgsql: plperl: Skip setting UTF8 flag when in SQL_ASCII encoding

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: plperl: Skip setting UTF8 flag when in SQL_ASCII encoding
Date: 2012-07-10 19:46:55
Message-ID: E1SogOd-0002HI-6k@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
plperl: Skip setting UTF8 flag when in SQL_ASCII encoding

When in SQL_ASCII encoding, strings passed around are not necessarily
UTF8-safe.  We had already fixed this in some places, but it looks like
we missed some.

I had to backpatch Peter Eisentraut's a8b92b60 to 9.1 in order for this
patch to cherry-pick more cleanly.

Patch from Alex Hunsaker, tweaked by Kyotaro HORIGUCHI and myself.

Some desultory cleanup and comment addition by me, during patch review.

Per bug report from Christoph Berg in
20120209102116(dot)GA14429(at)msgid(dot)df7cb(dot)de

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/7c460f0ba745611f4dadf413daa4ed9059951f92

Modified Files
--------------
src/pl/plperl/GNUmakefile              |    2 +-
src/pl/plperl/Util.xs                  |   27 ++++++++++----
src/pl/plperl/expected/plperl.out      |   10 -----
src/pl/plperl/expected/plperl_lc.out   |   33 +++++++++++++++++
src/pl/plperl/expected/plperl_lc_1.out |   41 +++++++++++++++++++++
src/pl/plperl/plperl_helpers.h         |   61 +++++++++++++++++++++++--------
src/pl/plperl/sql/plperl.sql           |    9 -----
src/pl/plperl/sql/plperl_lc.sql        |   24 ++++++++++++
8 files changed, 163 insertions(+), 44 deletions(-)

pgsql-committers by date

Next:From: Alvaro HerreraDate: 2012-07-10 19:53:18
Subject: pgsql: plperl: Skip setting UTF8 flag when in SQL_ASCII encoding
Previous:From: Tom LaneDate: 2012-07-10 18:54:54
Subject: pgsql: Re-implement extraction of fixed prefixes from regularexpressio

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group