From: | Pavel Golub <pavel(at)microolap(dot)com> |
---|---|
To: | Andrew Chernow <ac(at)esilo(dot)com> |
Cc: | Pavel Golub <pavel(at)microolap(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, <pgsql-interfaces(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] PQdeleteTuple function in libpq |
Date: | 2011-06-02 14:32:15 |
Message-ID: | 11417115.20110602173215@gf.microolap.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-interfaces |
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(at)gf(dot)microolap(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Chernow | 2011-06-02 14:33:07 | Re: PQdeleteTuple function in libpq |
Previous Message | Tom Lane | 2011-06-02 14:31:58 | Re: pgpool versus sequences |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Chernow | 2011-06-02 14:33:07 | Re: PQdeleteTuple function in libpq |
Previous Message | Andrew Chernow | 2011-06-02 14:12:40 | Re: PQdeleteTuple function in libpq |