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

From Jeremy Drake
Subject Re: WIP patch adding new regexp functions
Date
Msg-id Pine.BSO.4.64.0702071611370.28908@resin.csoft.net
Whole thread Raw
In response to Re: [HACKERS] writing new regexp functions  (Jeremy Drake <pgsql@jdrake.com>)
Responses patch adding new regexp functions  (Jeremy Drake <pgsql@jdrake.com>)
List pgsql-patches
On Wed, 7 Feb 2007, David Fetter wrote:

> On Wed, Feb 07, 2007 at 09:23:58AM -0500, Tom Lane wrote:
> > Jeremy Drake <pgsql@jdrake.com> writes:
> > > * Put together a patch to add these functions to core.  I could put them
> > >   directly in regexp.c, so the support functions could stay static.  My
> > >   concern here is that I don't know if there are any functions currently
> > >   in core with OUT parameters.
> >
> > As of 8.2 there are.
> >
> > If we are going to include these I would vote for core not contrib
> > status, exactly to avoid having to export those functions.
>
> +1 for core. :)

Here is a patch to add these functions to core.  Please take a look and
let me know what you think.  I had to jump through a bit of a hoop to
avoid opr_sanity test from breaking, may not have done that right.

Also, this patch allows regexp_replace to take more flags, since my two
new functions needed flags also, I split flag parsing into a seperate
function and made regexp_replace use it too.  It also results that the
error message for an invalid flag in regexp_replace changes, since it is
now more generic as it is called from multiple functions.

I still need to write documentation for the new functions before I
consider the patch completed, but please take a look at the code and see
if it is acceptable as I do not have any further changes planned for it.

--
Chicken Soup, n.:
    An ancient miracle drug containing equal parts of aureomycin,
    cocaine, interferon, and TLC.  The only ailment chicken soup
    can't cure is neurotic dependence on one's mother.
        -- Arthur Naiman, "Every Goy's Guide to Yiddish"

Attachment

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Stamp releases notes for 8.2.3, 8.1.8, 8.0.12.
Next
From: Tom Lane
Date:
Subject: Re: Configure template change to use SysV Semaphors on darwin