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

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: [GENERAL] plperl and regexps with accented characters - incompatible?
Дата
Msg-id 20071129121704.GB18326@depesz.com
обсуждение исходный текст
Ответ на Re: [GENERAL] plperl and regexps with accented characters - incompatible?  (Andrew Dunstan <andrew@dunslane.net>)
Список 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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: pgwin32_open returning EINVAL
Следующее
От: "Usama Dar"
Дата:
Сообщение: Re: PG 7.3 is five years old today