From: | hubert depesz lubaczewski <depesz(at)depesz(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | plperl and regexps with accented characters - incompatible? |
Date: | 2007-11-11 07:19:24 |
Message-ID: | 20071111071924.GA22922@depesz.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers pgsql-patches |
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)
From | Date | Subject | |
---|---|---|---|
Next Message | Jorge Godoy | 2007-11-11 11:03:27 | Re: any way for ORDER BY x to imply NULLS FIRST in 8.3? |
Previous Message | rihad | 2007-11-11 06:51:20 | Re: any way for ORDER BY x to imply NULLS FIRST in 8.3? |
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2007-11-11 08:13:01 | Re: Win32 shared memory speed |
Previous Message | Bruce Momjian | 2007-11-11 03:57:16 | Re: Segmentation fault using digest from pg_crypto |
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2007-11-11 07:27:03 | Re: tsearch2api .. wrapper for integrated fultext |
Previous Message | Bruce Momjian | 2007-11-10 23:36:47 | Re: Contrib docs v1 |