| From: | Andrew Chernow <ac(at)esilo(dot)com> |
|---|---|
| To: | Pavel Golub <pavel(at)gf(dot)microolap(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: PQdeleteTuple function in libpq |
| Date: | 2011-06-02 14:33:07 |
| Message-ID: | 4DE79F23.3060204@esilo.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers pgsql-interfaces |
>> 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)?
>
Actually the best solution would be to call PQcopyResult with all
PG_COPYRES_XXX flags enabled except PG_COPYRES_TUPLES. Now call
PQsetvalue for each tuple you want to add.
--
Andrew Chernow
eSilo, LLC
global backup
http://www.esilo.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Teodor Sigaev | 2011-06-02 14:34:08 | Re: vacuum and row type |
| Previous Message | Pavel Golub | 2011-06-02 14:32:15 | Re: [HACKERS] PQdeleteTuple function in libpq |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2011-06-02 15:02:08 | Re: [HACKERS] PQdeleteTuple function in libpq |
| Previous Message | Pavel Golub | 2011-06-02 14:32:15 | Re: [HACKERS] PQdeleteTuple function in libpq |