Re: [patch] libpq one-row-at-a-time API - Mailing list pgsql-hackers

From Marko Kreen
Subject Re: [patch] libpq one-row-at-a-time API
Date
Msg-id CACMqXC+EJ7BfCDZpKbBYLWMXLUkXfkDuR9Nc0r7gFM5KgMR1hg@mail.gmail.com
Whole thread Raw
In response to Re: [patch] libpq one-row-at-a-time API  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [patch] libpq one-row-at-a-time API  (Marko Kreen <markokr@gmail.com>)
List pgsql-hackers
On Sat, Jun 16, 2012 at 6:09 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I guess this raises the question of whether we ought to revert the
> row-callback patch entirely and support only this approach.  IMO
> it is (barely) not too late to do that for 9.2, if we want to.
> If we don't want to, then this is just another new feature and
> should be considered for 9.3.

I think row-callback is dangerous API that does not solve any
important problems.

But I do like the 2-phase processing the rowproc patch introduced
and having a way to bypass unnecessary malloc()+copy.

So my preference would be to simply remove the callback API
but keep the processing and provide PQgetRowData() instead.

Although the win that it brings is significantly smaller thanks
to single-row PQgetResult().  So if it does not sound interesting
to others, it can be dropped.  Because the single-row processing
is the important feature we need, rest is extra.

--
marko


pgsql-hackers by date:

Previous
From: "ktm@rice.edu"
Date:
Subject: Re: libpq compression
Next
From: Tom Lane
Date:
Subject: Re: REVIEW: Optimize referential integrity checks (todo item)