regex from plperl

Поиск
Список
Период
Сортировка
От Ferruccio Zamuner
Тема regex from plperl
Дата
Msg-id E18SD8R-0006iV-00@global.dnsprotect.com
обсуждение исходный текст
Ответы Re: regex from plperl  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi,

I've written following function:

create or replace function dewey(text)
   returns text
   as '
 $_=shift;
 if (/(\d\d\d)/) {
    return "$1";
 } else {
    return("this is not a valid dewey!");
 }' language plperlu;

Then:

libri=# select dewey('432');
           dewey
----------------------------
 this is not a valid dewey!
(1 row)


It seems that regex doesn't work at all.

But regex are quite important for me.
Is There something that I've forgotten?


Best wishes,              \fer
--


В списке pgsql-general по дате отправления:

Предыдущее
От: "Ed L."
Дата:
Сообщение: 7.3.1: test select_having ... FAILED
Следующее
От: "Ed L."
Дата:
Сообщение: missing 7.3.1 pg_hba.conf examples