Re: select all matches for a regular expression ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Anton Melser" <melser(dot)anton(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: select all matches for a regular expression ?
Date: 2007-02-23 15:05:50
Message-ID: 17939.1172243150@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Anton Melser" <melser(dot)anton(at)gmail(dot)com> writes:
> I need to be able to get all the matches for a particular regexp from
> a text field that I need to use in another query in a function. Is
> this possible with plpgsql? Do I have to install the perl language?

You need plperl (or pltcl; likely plpython would work too) --- the
built-in regex functions don't have any way to return more than the
first match. There's a patch pending to provide more functionality
here for 8.3, but it won't help you today.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joris Dobbelsteen 2007-02-23 15:10:07 Re: complex referential integrity constraints
Previous Message djé djé 2007-02-23 15:05:42 false unique constraint error...for me