Re: PQdeleteTuple function in libpq

Поиск
Список
Период
Сортировка
От Andrew Chernow
Тема Re: PQdeleteTuple function in libpq
Дата
Msg-id 4DE79A58.4010608@esilo.com
обсуждение исходный текст
Ответ на Re: PQdeleteTuple function in libpq  (Pavel Golub <pavel@microolap.com>)
Ответы Re: PQdeleteTuple function in libpq  (Pavel Golub <pavel@microolap.com>)
Re: PQdeleteTuple function in libpq  (Andrew Chernow <ac@esilo.com>)
Re: PQdeleteTuple function in libpq  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
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.
>

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)?

-- 
Andrew Chernow
eSilo, LLC
global backup
http://www.esilo.com/


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alexey Klyukin
Дата:
Сообщение: Re: Identifying no-op length coercions
Следующее
От: Robert Haas
Дата:
Сообщение: Re: pgpool versus sequences