plperl and regexps with accented characters - incompatible? - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject plperl and regexps with accented characters - incompatible?
Date
Msg-id 20071111071924.GA22922@depesz.com
Whole thread Raw
Responses Re: plperl and regexps with accented characters - incompatible?  ("Greg Sabino Mullane" <greg@turnstep.com>)
List pgsql-general
hi,
i wrote this function:
#v+
CREATE OR REPLACE FUNCTION test(TEXT) RETURNS bool language plperl as $$
return (shift =~ /[a-ząćęłńóśźżĄĆĘŁŃŚÓŹŻ0-9_-]+/i) || 0;
$$;
#v-

it's functioning it not really relevant.

important thing is, that the creation of it fails:
psql:z.sql:25: ERROR:  creation of Perl function "texts_words_iu" failed:
'require' trapped by operation mask at line 15.

it looks strange - what "require"?

i mean - it is possible that perl itself loads something that is related to handling polish characters.

if i'll remove "i" flag to regexp matching - it works ok.
so, i assume perl loads something like "locale" or "utf8" modules to handle
//i, but since the error message doesn't mention what module it tried to load
it is quite hard to understand it.
also - perhaps loading of this particular module should be allowed even in
plperl? otherwise it requires me to use plperlu for even the simple task of
regexp matching.

if i'll remove //i flag - it works correctly, but then i have to change "a-z" to "a-zA-Z", and it's not really nice.

any ideas what's wrong, and how can i fix it?

depesz

--
quicksil1er: "postgres is excellent, but like any DB it requires a
highly paid DBA.  here's my CV!" :)
http://www.depesz.com/ - blog dla ciebie (i moje CV)

pgsql-general by date:

Previous
From: rihad
Date:
Subject: Re: any way for ORDER BY x to imply NULLS FIRST in 8.3?
Next
From: Jorge Godoy
Date:
Subject: Re: any way for ORDER BY x to imply NULLS FIRST in 8.3?