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

From hubert depesz lubaczewski
Subject Re: [GENERAL] plperl and regexps with accented characters - incompatible?
Date
Msg-id 20071129121704.GB18326@depesz.com
Whole thread Raw
In response to Re: [GENERAL] plperl and regexps with accented characters - incompatible?  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Thu, Nov 29, 2007 at 12:39:30AM -0500, Andrew Dunstan wrote:
> The attached patch works for me to eliminate the errors. Please test ASAP.

tested, works for me:
#v+
# CREATE OR REPLACE FUNCTION test(TEXT) RETURNS bool language plperl as $$
return (shift =~ /[a-ząćęłńóśźżĄĆĘŁŃŚÓŹŻ0-9_-]+/i) || 0;
$$;
CREATE FUNCTION

# select test('depesz');
 test
------
 t
(1 row)

# select test('depesząćęł');
 test
------
 t
(1 row)

# select test('depesząćęł$');
 test
------
 t
(1 row)

# select test('dePEsząĆęł$');
 test
------
 t
(1 row)
#v-

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-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pgwin32_open returning EINVAL
Next
From: "Usama Dar"
Date:
Subject: Re: PG 7.3 is five years old today