test against regexp in database

Поиск
Список
Период
Сортировка
От Holger Marzen
Тема test against regexp in database
Дата
Msg-id Pine.LNX.4.44.0211241316180.16389-100000@bluebell.marzen.de
обсуждение исходный текст
Список pgsql-general
Hi boys and girls,

as we all know, PostgreSQL can do selects on regexps. But I'd like to
store regexps in a table with the columns "from" and "to". The "from"
column should contain email sender adresses, and the "to" column should
contain faxnumbers the user is allowed to send faxes to (mail to fax
gateway). I'd like to uses regexps as well in the "to" column, say

from            to
------          ---------
holger@home.de  .*
you@aol.com     ^0123.*

and test against this. Of yourse I can do a select with "from=userid"
and then pipe the result through some commands that do the regexp check.
but is there a more elegant way to do this, maybe in a single select?


--
PGP/GPG Key-ID:
http://blackhole.pca.dfn.de:11371/pks/lookup?op=get&search=0xB5A1AFE1


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

Предыдущее
От: Louis-David Mitterrand
Дата:
Сообщение: is backing up a live postgres enough?
Следующее
От: Frank Bax
Дата:
Сообщение: Re: test against regexp in database