Re: back references using regex - Mailing list pgsql-general

From Michael Fuhr
Subject Re: back references using regex
Date
Msg-id 20050908195816.GA84083@winnie.fuhr.org
Whole thread Raw
In response to Re: back references using regex  (Matthew Peter <survivedsushi@yahoo.com>)
Responses Re: back references using regex
List pgsql-general
On Thu, Sep 08, 2005 at 12:45:40PM -0700, Matthew Peter wrote:
> Ya, but I'd have to recompile to get python in.

Recompiling to add support for another procedural language is a
one-time operation and it's easy to do, so that's not a good argument.

> Plus, I don't want to use Python. I want to use and learn
> more pgsql.  Keep things clean and lean if possible...

"Clean and lean" suggests using the right tool for the job.  Languages
like Perl and Python are better at string manipulation than PL/pgSQL,
and one of PostgreSQL's strengths is that it allows you to write
server-side functions in those languages.  Exploit such strengths
when it makes sense.

> I just got a postgres book yesterday for additional
> reading which it only had 2 pages on regex's in the
> index :(

Regular expressions aren't specific to PostgreSQL; there's ample
material covering them elsewhere.  See for example _Mastering
Regular Expressions_ by Jeffrey Friedl.  I'm sure a search engine
would yield many free tutorials on the subject.

--
Michael Fuhr

pgsql-general by date:

Previous
From: Matthew Peter
Date:
Subject: Re: back references using regex
Next
From: Peter Eisentraut
Date:
Subject: Re: per user logging