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

Re: [HACKERS] [GENERAL] plperl and regexps with accented characters - incompatible?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: hubert depesz lubaczewski <depesz(at)depesz(dot)com>, pgsql-hackers(at)postgresql(dot)org, "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] [GENERAL] plperl and regexps with accented characters - incompatible?
Date: 2007-11-30 20:22:07
Message-ID: 475070EF.4050101@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackerspgsql-patches
I wrote:
>
>>
>> OK, I have a fairly ugly manual workaround, that I don't yet 
>> understand, but seems to work for me.
>>
>> In your session, run the following code before you do anything else:
>>
>> CREATE OR REPLACE FUNCTION test(text) RETURNS bool LANGUAGE plperl as $$
>> return shift =~ /\xa9/i ? 'true' : 'false';
>> $$;
>> SELECT test('a');
>> DROP FUNCTION test(text);
>>
>> After that we seem to be good to go with any old UTF8 chars.
>>
>> I'm looking at automating this so the workaround can be hidden, but 
>> I'd rather understand it first.
>>
>> (Core guys: If we can hold RC1 for a bit while I get this fixed that 
>> would be good.)
>>
>>
>
> The attached patch works for me to eliminate the errors. Please test 
> ASAP.
>
>

Given our time constraints I intend to apply this to HEAD and backpatch 
it to 8.2 and 8.1, unless there's a strenuous objection. That will give 
us some buildfarm coverage on it, although we don't seem to have any 
perl 5.6.x on the buildfarm that I could see. We've had a positive test 
report, no negative reports, and I'm fairly sure the patch is at worst 
harmless.


cheers

andrew

In response to

pgsql-hackers by date

Next:From: Brendan JurdDate: 2007-11-30 20:26:15
Subject: Re: [GENERAL] Empty arrays with ARRAY[]
Previous:From: Jeff DavisDate: 2007-11-30 20:07:33
Subject: Re: Sorting Improvements for 8.4

pgsql-patches by date

Next:From: Brendan JurdDate: 2007-11-30 20:26:15
Subject: Re: [GENERAL] Empty arrays with ARRAY[]
Previous:From: Tom LaneDate: 2007-11-30 14:53:20
Subject: Re: pg_regress: paths in largeobject test

pgsql-general by date

Next:From: Brendan JurdDate: 2007-11-30 20:26:15
Subject: Re: [GENERAL] Empty arrays with ARRAY[]
Previous:From: Lincoln YeohDate: 2007-11-30 20:16:18
Subject: Re: postgresql table inheritance

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