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

From Bruce Momjian
Subject Re: patch adding new regexp functions
Date
Msg-id 200703270052.l2R0qlx14787@momjian.us
Whole thread Raw
In response to Re: patch adding new regexp functions  (Jeremy Drake <pgsql@jdrake.com>)
Responses Re: patch adding new regexp functions
List pgsql-patches
Jeremy Drake wrote:
> On Thu, 22 Mar 2007, Tom Lane wrote:
>
> > AFAIR, the reason there's no TextPGetDatum (and ditto for lots of other
> > datatypes) is lack of obvious usefulness.  A function dealing with a
> > "text *" doesn't normally have reason to convert that to a Datum until
> > it returns --- and at that point PG_RETURN_TEXT_P is the thing to use.
> > Do you have a counterexample, or does this just suggest that the regexp
> > function patch needs some refactoring?
>
> If you are asking why I have reason to convert text * to a Datum in cases
> other than PG_RETURN_TEXT_P, it is used for calling text_substr functions
> using DirectFunctionCallN.  BTW, this usage of text_substr using
> PointerGetDatum was copied from the pre-existing textregexsubstr function.

Is there a follup patch based on this discussion?

--
  Bruce Momjian  <bruce@momjian.us>          http://momjian.us
  EnterpriseDB                               http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Improvement of procArray.xmin for VACUUM
Next
From: Bruce Momjian
Date:
Subject: Re: Numeric patch to add special-case representations for < 8 bytes