Re: [GENERAL] Retrieving query results - Mailing list pgsql-general

From Tom Lane
Subject Re: [GENERAL] Retrieving query results
Date
Msg-id 20937.1503760366@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] Retrieving query results  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [GENERAL] Retrieving query results  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-general
Michael Paquier <michael.paquier@gmail.com> writes:
> On Fri, Aug 25, 2017 at 8:10 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I think the real problem occurs where we realloc the array bigger.

> Looking at the surroundings, I think that it would be nice to have
> pqAddTuple and PQsetvalue set an error message with this patch.

Yeah, I was thinking about that myself - the existing design presumes
that the only possible reason for failure of pqAddTuple is OOM, but
it'd be better to distinguish "too many tuples" from true OOM.  So
we should also refactor to make pqAddTuple responsible for setting
the error message.  Might be best to do the refactoring first.

            regards, tom lane


pgsql-general by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [GENERAL] Retrieving query results
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] Change location of function/type installed from C-extension