Re: patch adding new regexp functions

From: David Fetter <david(at)fetter(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Jeremy Drake <pgsql(at)jdrake(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>, Neil Conway <neilc(at)samurai(dot)com>
Subject: Re: patch adding new regexp functions
Date: 2007-02-16 18:28:39
Message-ID: 20070216182839.GG21379@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Fri, Feb 16, 2007 at 01:03:32PM -0500, Andrew Dunstan wrote:
> David Fetter wrote:
> >>
> >>The question is, what is the use case? If there is one in Perl, can
> >>this proposed function API support it?
> >>
> >
> >Perl makes the following variables available in any regex match,
> >although it optimizes some cases for when they're not there:
> >
> >$1, ... $n (captured matches in parentheses)
> >$` (pre-match)
> >$' (post-match)
> >$& (whole match)
> >
>
> Use of any of these is notoriously costly, BTW, especially pre-match
> and post-match. See perlre man page.

This is why they only appear when called for :)

Cheers,
D
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter

Remember to vote!

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2007-02-16 18:37:43 pgsql: Better fix for determining minimum and maximum int64 values that
Previous Message Peter Eisentraut 2007-02-16 18:19:54 Re: patch adding new regexp functions

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2007-02-16 21:34:16 Re: [HACKERS] Another aspect of set_ps_display ()
Previous Message Peter Eisentraut 2007-02-16 18:19:54 Re: patch adding new regexp functions