Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] [GENERAL] plperl and regexps with accented characters - incompatible?

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Greg Sabino Mullane <greg(at)turnstep(dot)com>, pgsql-hackers(at)postgresql(dot)org,"Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] [GENERAL] plperl and regexps with accented characters - incompatible?
Date: 2007-11-29 12:17:04
Message-ID: 20071129121704.GB18326@depesz.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackerspgsql-patches
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)

In response to

pgsql-hackers by date

Next:From: Usama DarDate: 2007-11-29 12:26:14
Subject: Re: PG 7.3 is five years old today
Previous:From: Alvaro HerreraDate: 2007-11-29 12:09:47
Subject: Re: pgwin32_open returning EINVAL

pgsql-patches by date

Next:From: Andrew DunstanDate: 2007-11-29 14:14:20
Subject: Re: Re: [HACKERS] [GENERAL] plperl and regexps with accented characters - incompatible?
Previous:From: Jorgen Austvik - Sun NorwayDate: 2007-11-29 12:04:22
Subject: pg_regress: paths in largeobject test

pgsql-general by date

Next:From: Shane AmblerDate: 2007-11-29 12:23:59
Subject: Re: 1 cluster on several servers
Previous:From: Willy-Bas LoosDate: 2007-11-29 11:50:58
Subject: 1 cluster on several servers

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group