Skip site navigation (1) Skip section navigation (2)

Re: patch adding new regexp functions

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Jeremy Drake <pgsql(at)jdrake(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gregory Stark <stark(at)enterprisedb(dot)com>, Neil Conway <neilc(at)samurai(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, David Fetter <david(at)fetter(dot)org>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>, Mark Dilger <pgsql(at)markdilger(dot)com>
Subject: Re: patch adding new regexp functions
Date: 2007-03-27 00:52:47
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-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(at)momjian(dot)us>

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

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2007-03-27 01:04:57
Subject: Re: Bug: Buffer cache is not scan resistant
Previous:From: Bruce MomjianDate: 2007-03-27 00:39:54
Subject: Re: TOASTing smaller things

pgsql-patches by date

Next:From: Bruce MomjianDate: 2007-03-27 01:07:41
Subject: Re: Numeric patch to add special-case representations for < 8 bytes
Previous:From: Bruce MomjianDate: 2007-03-27 00:50:48
Subject: Re: Improvement of procArray.xmin for VACUUM

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group