Re: [GENERAL] plperl and regexps with accented characters - incompatible? - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: [GENERAL] plperl and regexps with accented characters - incompatible?
Date
Msg-id 473A658C.8030305@dunslane.net
Whole thread Raw
In response to Re: [GENERAL] plperl and regexps with accented characters - incompatible?  ("Greg Sabino Mullane" <greg@turnstep.com>)
Responses Re: [GENERAL] plperl and regexps with accented characters - incompatible?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Greg Sabino Mullane wrote:
>> Ugh, in testing I see some nastiness here without any explicit
>> require. It looks like there's an implicit require if the text
>> contains certain chars.
>>
>
> Exactly.
>
>
>> Looks like it's going to be very hard, unless someone has some
>> brilliant insight I'm missing :-(
>>
>
> The only way I see around it is to do:
>
> $PLContainer->permit('require');
> ...
> $PLContainer->reval('use utf8;');
> ...
> $PLContainer->deny('require');"
>
> Not ideal.

I tried something like that briefly and it failed. The trouble is, I
think, that since the engine tries a require it fails on the op test
before it even looks to see if the module is already loaded. If you have
made something work then please show me, no matter how grotty.

> Part of me says we do this because something like //i
> shouldn't suddenly fail just because you added an accented
> character. The other part of me says to just have people use plperlu.
> At the very least, we should probably mention it in the docs as
> a gotcha.
>
>

I think we should search harder for a solution, but I don't have time
right now. If you want to submit a warning for the docs in a patch we
can get that in.

cheers

andrew

pgsql-hackers by date:

Previous
From: "Merlin Moncure"
Date:
Subject: Re: How to keep a table in memory?
Next
From: Tom Lane
Date:
Subject: Re: Simplifying Text Search