Re: [PATCHES] Text <-> C string

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Brendan Jurd" <direvus(at)gmail(dot)com>
Cc: "Gregory Stark" <stark(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [PATCHES] Text <-> C string
Date: 2008-03-20 04:43:22
Message-ID: 26079.1205988202@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

"Brendan Jurd" <direvus(at)gmail(dot)com> writes:
> One of the questions in the original patch submission was whether it
> would be worth changing all those DirectFunctionCall(textin) and
> (textout) calls to use the new functions. Is it worthwhile avoiding
> the fmgr overhead?

I think that's worth doing just on notational clarity grounds.
The small cycle savings doesn't excite me, but understanding
DirectFunctionCall1(textin, CStringGetDatum(foo)) just involves
more different bits of trivia than cstring_to_text(foo).

> Last time I looked, the codebase had shifted quite a bit since I
> originally wrote the patch. So it probably needs some work to apply
> cleanly on the latest sources anyway.

Yeah, with wide-impact patches like this you are always going to have
that problem. One point though is that we don't have to improve every
call site at the same time. I'd be inclined to put in the new functions
and hit some representative sample of utils/adt/ files in the first
commit, and then incrementally fix other stuff.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message longlong 2008-03-20 06:00:31 Re: COPY issue(gsoc project)
Previous Message Brendan Jurd 2008-03-20 02:03:56 Re: [PATCHES] Text <-> C string

Browse pgsql-patches by date

  From Date Subject
Next Message Tatsuo Ishii 2008-03-20 06:04:15 Re: Proposal: new large object API
Previous Message Brendan Jurd 2008-03-20 02:03:56 Re: [PATCHES] Text <-> C string