Re: [patch] libpq one-row-at-a-time API

Поиск
Список
Период
Сортировка
От Marko Kreen
Тема Re: [patch] libpq one-row-at-a-time API
Дата
Msg-id CACMqXC+L8cBRSGV96+ZWVSui_TmPby5tUNV86tskUdquB+9GPQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [patch] libpq one-row-at-a-time API  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [patch] libpq one-row-at-a-time API  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Jul 16, 2012 at 4:33 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Marko Kreen <markokr@gmail.com> writes:
>> On Mon, Jul 16, 2012 at 4:11 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> I'm starting to look at this patch now.  I think we could drop the
>>> PQgetRowData() API: it complicates matters for little gain that I can
>>> see.  The argument for it was to avoid the cost of creating a PGresult
>>> per row, but we're already going to pay the cost of creating a
>>> PGresult in order to return the PGRES_SINGLE_TUPLE status.
>
>> No.  Please look again, it is supposed to be called instead of PGgetResult().
>
> Mm.  I still think we should drop it, because it's still a dangerous API
> that's not necessary for the principal benefit of this feature.

Yes, it is a secondary feature, but it fits the needs of the actual target
audience of the single-row feature - various high-level wrappers of libpq.

Also it is needed for high-performance situations, where the
single-row-mode fits well even for C clients, except the
advantage is negated by new malloc-per-row overhead.

-- 
marko


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: CompactCheckpointerRequestQueue versus pad bytes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: CompactCheckpointerRequestQueue versus pad bytes