Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id DCEF2B612AA; Thu, 2 Jun 2011 11:12:45 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 14611-04; Thu, 2 Jun 2011 14:12:38 +0000 (UTC) Received: from mx2.hub.org (mx2.hub.org [200.46.204.254]) by mail.postgresql.org (Postfix) with ESMTP id 89C69B6126E; Thu, 2 Jun 2011 11:12:38 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.esilo.com (ns1.esilo.com [63.150.152.211]) by mx2.hub.org (Postfix) with ESMTP id 63D253EADA3A; Thu, 2 Jun 2011 11:12:38 -0300 (ADT) Received: from [10.0.0.2] (fwext-esilo-jupiter.esilo.com [173.162.79.161]) (authenticated bits=0) by mail.esilo.com (8.13.1/8.13.1) with ESMTP id p52ECW7l032494 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Thu, 2 Jun 2011 10:12:33 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=esilo.com; s=200912; t=1307023953; bh=OUyITrjmL33K0447ufqmjRGhhXQ=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=nheJkiwHSFEGToKipFYMKbWrJUIiMiJmjIiY5HsYo3P9yYyPA6zdcTt1a5+Jk3J6v PDeLTsJwVByV4VJKZT9jGBEdbucEmQL7W0GK10vAfo6xxfTPjZsHQzEl4i6XG5gU7s TmSEp3fWtUXsToUFVDlz766Z2uOz6A03rycdKh/Q= DomainKey-Signature: a=rsa-sha1; s=main; d=esilo.com; c=simple; q=dns; b=X9XzoB8xZfLEVSdREfQNPopKTfOlP3zk3CUo9Yl+xG/pz4MZ9ag72TDEUaA0/DUt7 2BIzh0tNPVx04pyFvCFew== Message-ID: <4DE79A58.4010608@esilo.com> Date: Thu, 02 Jun 2011 10:12:40 -0400 From: Andrew Chernow User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Pavel Golub CC: Pavel Golub , PostgreSQL Hackers , pgsql-interfaces@postgresql.org Subject: Re: PQdeleteTuple function in libpq References: <147534417.20110601184310@gf.microolap.com> <4DE6A5B7.2070700@esilo.com> <707574086.20110602112826@gf.microolap.com> In-Reply-To: <707574086.20110602112826@gf.microolap.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201106/119 X-Sequence-Number: 188832 On 6/2/2011 4:28 AM, Pavel Golub wrote: > Hello, Andrew. > > You wrote: > > AC> On 6/1/2011 11:43 AM, Pavel Golub wrote: >>> Hello. >>> >>> I'm some kind of PQdeleteTuple function will be very usefull in libpq. >>> Because right now after deleting some record I need refetch result >>> set, or mark tuple as deleted and this is headache for me. >>> > > AC> IMHO, this should be handled by the application. You could track tuples > AC> removed in an int[] or copy the result set into an application defined > AC> array of C structures. I've always been under the impression that > AC> PGresult objects are immutable once delivered to the application. > > > 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)? -- Andrew Chernow eSilo, LLC global backup http://www.esilo.com/