agora inbox for pgsql-interfaces@postgresql.org
help / color / mirror / Atom feedFrom: Pavel Golub <pavel@microolap.com>
To: Andrew Chernow <ac@esilo.com>
Cc: Pavel Golub <pavel@microolap.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: [HACKERS] PQdeleteTuple function in libpq
Date: Thu, 2 Jun 2011 17:32:15 +0300
Message-ID: <11417115.20110602173215@gf.microolap.com> (raw)
In-Reply-To: <4DE79A58.4010608@esilo.com>
References: <147534417.20110601184310@gf.microolap.com>
<4DE6A5B7.2070700@esilo.com>
<707574086.20110602112826@gf.microolap.com>
<4DE79A58.4010608@esilo.com>
Hello, Andrew.
You wrote:
AC> 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.
>>
AC> I'm not entirely sure what you are trying to do, but can't you use
AC> PQmakeEmptyPGresult, PQsetResultAttrs and PQsetvalue to construct a
AC> result that excludes the tuples you don't want followed by a
AC> PQclear(initial_result)?
Well, yes. I can. But don't you think it's too complex? Plus such
approach uses twice as much memory.
--
With best wishes,
Pavel mailto:pavel@gf.microolap.com
view thread (17+ messages) latest in thread
Message-ID: <11417115.20110602173215@gf.microolap.com>
Permalink: ../11417115.20110602173215@gf.microolap.com/
Also on: postgresql.org/message-id/11417115.20110602173215@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, ac@esilo.com, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] PQdeleteTuple function in libpq
In-Reply-To: <11417115.20110602173215@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