Re: patch adding new regexp functions - Mailing list pgsql-patches

From Peter Eisentraut
Subject Re: patch adding new regexp functions
Date
Msg-id 200702171812.55703.peter_e@gmx.net
Whole thread Raw
In response to Re: patch adding new regexp functions  (Jeremy Drake <pgsql@jdrake.com>)
List pgsql-patches
Jeremy Drake wrote:
> For this case see string_to_array:

That only works with fixed delimiters, and I was hoping that
regexp_split would be an alternative with regexp delimiters.  It's
certainly another argument that all the split functions in PostgreSQL
should offer analogous interfaces.  There is no reason being offered
why splitting on a fixed string should result in an array and splitting
on a regexp should result in a table.

> The particular use case I had for this function was at a previous
> employer, and I am not sure exactly how much detail is appropriate to
> divulge.  Basically, the project was doing some text processing
> inside of postgres, and getting all of the words from a string into a
> table with some processing (excluding stopwords and so forth) as
> efficiently as possible was a big concern.

We already have tsearch for that.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

pgsql-patches by date:

Previous
From: "Chad Wagner"
Date:
Subject: Re: \prompt for psql
Next
From: Tom Lane
Date:
Subject: Re: \prompt for psql