plperl and regexps with accented characters - incompatible?

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема plperl and regexps with accented characters - incompatible?
Дата
Msg-id 20071111071924.GA22922@depesz.com
обсуждение исходный текст
Ответы Re: plperl and regexps with accented characters - incompatible?
Список 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 по дате отправления:

Предыдущее
От: rihad
Дата:
Сообщение: Re: any way for ORDER BY x to imply NULLS FIRST in 8.3?
Следующее
От: Jorge Godoy
Дата:
Сообщение: Re: any way for ORDER BY x to imply NULLS FIRST in 8.3?