Re: Problem: libpq, network traffic, memory usage

Поиск
Список
Период
Сортировка
От Volkan YAZICI
Тема Re: Problem: libpq, network traffic, memory usage
Дата
Msg-id 20051207174452.GB532@alamut
обсуждение исходный текст
Ответ на Re: Problem: libpq, network traffic, memory usage  (Alexander Scholz <alexander.scholz1@freenet.de>)
Список pgsql-general
On Dec 07 06:36, Alexander Scholz wrote:
> sorry for probably asking such a stupid question, but we are using a
> PQexec(). Where should I specify that cursor declaration?

Just like as you're querying with pgAdmin:

PQexec(conn, "BEGIN");
PQexec(conn, "DECLARE \"test\" CURSOR FOR SELECT * FROM \"TEST\"");
for (...)
{
    PQexec(conn, "FETCH FORWARD 100 from \"test\"");
    /* Use just retrieved result. */

    /* Don't forget to clear used PGresult. */
}
PQexec(conn, "...");

--
"We are the middle children of history, raised by television to believe
that someday we'll be millionaires and movie stars and rock stars, but
we won't. And we're just learning this fact," Tyler said. "So don't
fuck with us."

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

Предыдущее
От: Alexander Scholz
Дата:
Сообщение: Re: Problem: libpq, network traffic, memory usage
Следующее
От: Karsten Hilbert
Дата:
Сообщение: Re: [pgsql-de-allgemein] Query SELECT * sehr langsam