Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 0CEC5B60E69; Thu, 2 Jun 2011 12:07:43 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 63065-04; Thu, 2 Jun 2011 15:07:36 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-fx0-f46.google.com (mail-fx0-f46.google.com [209.85.161.46]) by mail.postgresql.org (Postfix) with ESMTP id AD452B60DE2; Thu, 2 Jun 2011 12:07:35 -0300 (ADT) Received: by fxm17 with SMTP id 17so756294fxm.19 for ; Thu, 02 Jun 2011 08:07:34 -0700 (PDT) Received: by 10.223.127.210 with SMTP id h18mr934033fas.79.1307027254734; Thu, 02 Jun 2011 08:07:34 -0700 (PDT) Received: from [192.168.1.104] (161-32-133-95.pool.ukrtel.net [95.133.32.161]) by mx.google.com with ESMTPS id l26sm206311fam.45.2011.06.02.08.07.32 (version=SSLv3 cipher=OTHER); Thu, 02 Jun 2011 08:07:33 -0700 (PDT) Date: Thu, 2 Jun 2011 18:07:30 +0300 From: Pavel Golub Reply-To: Pavel Golub Organization: Microolap X-Priority: 3 (Normal) Message-ID: <1003921930.20110602180730@gf.microolap.com> To: Alvaro Herrera CC: Andrew Chernow , Pavel Golub , PostgreSQL Hackers , pgsql-interfaces Subject: Re: [HACKERS] PQdeleteTuple function in libpq In-Reply-To: <1307026778-sup-415@alvh.no-ip.org> References: <147534417.20110601184310@gf.microolap.com> <4DE6A5B7.2070700@esilo.com> <707574086.20110602112826@gf.microolap.com> <4DE79A58.4010608@esilo.com> <1307026778-sup-415@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201106/8 X-Sequence-Number: 6953 Hello, Alvaro. You wrote: AH> Excerpts from Andrew Chernow's message of jue jun 02 10:12:40 -0400 2011: >> > Andrew, why we have PQmakeEmptyPGresult, PQcopyResult, >> > PQsetResultAttrs, PQsetvalue and PQresultAlloc in this case? Of course >> > there's no big deal with their absence but let's be consistent. >> >> I'm not entirely sure what you are trying to do, but can't you use >> PQmakeEmptyPGresult, PQsetResultAttrs and PQsetvalue to construct a >> result that excludes the tuples you don't want followed by a >> PQclear(initial_result)? AH> Seems pretty wasteful if you want to delete a single tuple from a large AH> result. I think if you desired to compact the result to free some AH> memory after deleting a large fraction of the tuples in the result it AH> could be useful to do that, otherwise just live with the unused holes in AH> the storage area as suggested by Pavel. Totally! Thanks Alvaro. -- With best wishes, Pavel mailto:pavel@gf.microolap.com