Re: [PATCHES] Text <-> C string

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] Text <-> C string
Дата
Msg-id 26079.1205988202@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCHES] Text <-> C string  ("Brendan Jurd" <direvus@gmail.com>)
Список pgsql-hackers
"Brendan Jurd" <direvus@gmail.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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Omar Bettin"
Дата:
Сообщение: diabolic state
Следующее
От: longlong
Дата:
Сообщение: Re: COPY issue(gsoc project)