Re: patch adding new regexp functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeremy Drake <pgsql(at)jdrake(dot)com>
Cc: 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-22 05:32:53
Message-ID: 26219.1174541573@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Jeremy Drake <pgsql(at)jdrake(dot)com> writes:
> I could not find such a thing using ctags, nor TextPGetDatum(). I looked
> at PG_RETURN_TEXT_P and it just uses PG_RETURN_POINTER, which in turn uses
> PointerGetDatum. If there is such a thing, it is well camoflaged...

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?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message ITAGAKI Takahiro 2007-03-22 05:41:35 LIKE optimization in UTF-8 and locale-C
Previous Message Tatsuo Ishii 2007-03-22 05:23:27 Re: Proposal: Adding JIS X 0213 support

Browse pgsql-patches by date

  From Date Subject
Next Message ITAGAKI Takahiro 2007-03-22 05:41:35 LIKE optimization in UTF-8 and locale-C
Previous Message Jeremy Drake 2007-03-22 05:21:28 Re: patch adding new regexp functions