Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dlcnu-0002UZ-6Q for pgsql-general@arkaria.postgresql.org; Sat, 26 Aug 2017 15:15:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dlcnt-0005h7-PN for pgsql-general@arkaria.postgresql.org; Sat, 26 Aug 2017 15:15:17 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dlclV-0001N7-Lt for pgsql-general@postgresql.org; Sat, 26 Aug 2017 15:12:49 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dlclT-0000Ir-7h for pgsql-general@postgresql.org; Sat, 26 Aug 2017 15:12:48 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v7QFCkwa020938; Sat, 26 Aug 2017 11:12:46 -0400 From: Tom Lane To: Michael Paquier cc: Igor Korot , pgsql-general Subject: Re: Retrieving query results In-reply-to: References: <32584.1503579096@sss.pgh.pa.us> <14978.1503586593@sss.pgh.pa.us> <17247.1503616204@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Sat, 26 Aug 2017 22:29:56 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20936.1503760366.1@sss.pgh.pa.us> Date: Sat, 26 Aug 2017 11:12:46 -0400 Message-ID: <20937.1503760366@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Michael Paquier writes: > On Fri, Aug 25, 2017 at 8:10 AM, Tom Lane 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 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general