Re: PQdeleteTuple function in libpq - Mailing list pgsql-hackers

From Pavel Golub
Subject Re: PQdeleteTuple function in libpq
Date
Msg-id 1003921930.20110602180730@gf.microolap.com
Whole thread Raw
In response to Re: PQdeleteTuple function in libpq  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pgpool versus sequences
Next
From: Marko Kreen
Date:
Subject: Re: Please test peer (socket ident) auth on *BSD