Re: [HACKERS] PQdeleteTuple function in libpq

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [HACKERS] PQdeleteTuple function in libpq
Дата
Msg-id 1307026778-sup-415@alvh.no-ip.org
обсуждение исходный текст
Ответ на PQdeleteTuple function in libpq  (Pavel Golub <pavel@microolap.com>)
Ответы Re: [HACKERS] PQdeleteTuple function in libpq
Список pgsql-interfaces
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)?

Seems pretty wasteful if you want to delete a single tuple from a large
result.  I think if you desired to compact the result to free some
memory after deleting a large fraction of the tuples in the result it
could be useful to do that, otherwise just live with the unused holes in
the storage area as suggested by Pavel.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: Pavel Golub
Дата:
Сообщение: Re: [HACKERS] PQdeleteTuple function in libpq
Следующее
От: Pavel Golub
Дата:
Сообщение: Re: [HACKERS] PQdeleteTuple function in libpq