Re: patch adding new regexp functions

From: David Fetter <david(at)fetter(dot)org>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: 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 16:11:21
Message-ID: 20070216161121.GD21379@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Fri, Feb 16, 2007 at 01:19:55PM +0100, Peter Eisentraut wrote:
> Am Freitag, 16. Februar 2007 08:02 schrieb Jeremy Drake:
> > On Thu, 15 Feb 2007, Peter Eisentraut wrote:
> > > I have no strong opinion about how matches are returned. Seeing
> > > the definitional difficulties that you point out, it may be fine
> > > to return them unordered. But then all "matches" functions
> > > should do that.
> > >
> > > For the "split" functions, however, providing the order is
> > > clearly important.
> >
> > Does this version sufficiently address your concerns?
>
> I don't think anyone asked for the start position and length in the
> result of regexp_split(). The result should be an array of text.
> That is what Perl et al. do.
>
> As for the regexp_matches() function, it seems to me that it returns
> too much information at once. What is the use case for getting all
> of prematch, fullmatch, matches, and postmatch in one call?

If not in one call, how would you get it? Perl, for example, makes
these available to any regex match in the form of variables it sets.

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavan Deolasee 2007-02-16 16:11:26 Re: HOT for PostgreSQL 8.3
Previous Message Zeugswetter Andreas ADI SD 2007-02-16 15:56:16 Re: HOT for PostgreSQL 8.3

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2007-02-16 16:31:07 Re: [GENERAL] ISO week dates
Previous Message Alvaro Herrera 2007-02-16 15:50:44 Re: [GENERAL] ISO week dates