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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-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

Browse pgsql-general by date

  From Date Subject
Next Message Shane Ambler 2007-11-29 12:23:59 Re: 1 cluster on several servers
Previous Message Willy-Bas Loos 2007-11-29 11:50:58 1 cluster on several servers

Browse pgsql-hackers by date

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

Browse pgsql-patches by date

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