Re: [HACKERS] 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: pgsql-general(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] plperl and regexps with accented characters - incompatible?
Date: 2007-11-14 03:03:40
Message-ID: 473A658C.8030305@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-patches

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2007-11-14 03:54:07 Re: Path to top of tree
Previous Message Greg Sabino Mullane 2007-11-14 02:58:42 Re: [HACKERS] plperl and regexps with accented characters - incompatible?

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-11-14 03:34:37 Re: Simplifying Text Search
Previous Message Merlin Moncure 2007-11-14 03:02:59 Re: How to keep a table in memory?

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-11-14 03:50:41 Re: a tsearch2 (8.2.4) dictionary that only filters out stopwords
Previous Message Greg Sabino Mullane 2007-11-14 02:58:42 Re: [HACKERS] plperl and regexps with accented characters - incompatible?