agora inbox for pgsql-interfaces@postgresql.org  
help / color / mirror / Atom feed
From: Pavel Golub <pavel@microolap.com>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Andrew Chernow <ac@esilo.com>
Cc: Pavel Golub <pavel@microolap.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: pgsql-interfaces <pgsql-interfaces@postgresql.org>
Subject: Re: [HACKERS] PQdeleteTuple function in libpq
Date: Thu, 2 Jun 2011 18:07:30 +0300
Message-ID: <1003921930.20110602180730@gf.microolap.com> (raw)
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>

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




view thread (17+ messages)  latest in thread

Message-ID: <1003921930.20110602180730@gf.microolap.com>
Permalink:  ../1003921930.20110602180730@gf.microolap.com/
Also on:    postgresql.org/message-id/1003921930.20110602180730@gf.microolap.com

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: pavel@microolap.com, alvherre@commandprompt.com, ac@esilo.com, pgsql-hackers@postgresql.org
  Subject: Re: [HACKERS] PQdeleteTuple function in libpq
  In-Reply-To: <1003921930.20110602180730@gf.microolap.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox