are cursors necessary?

Поиск
Список
Период
Сортировка
От Mark Harrison
Тема are cursors necessary?
Дата
Msg-id 3FCFB948.90100@pixar.com
обсуждение исходный текст
Ответы Re: are cursors necessary?
Re: are cursors necessary?
Список pgsql-general
In the program testlibpq.c, these five SQL statements are executed:

    res = PQexec(conn, "BEGIN");
    res = PQexec(conn, "DECLARE myportal CURSOR FOR select * from pg_database");
    res = PQexec(conn, "FETCH ALL in myportal");
    res = PQexec(conn, "CLOSE myportal");
    res = PQexec(conn, "END");

Is this just to illustrate how to create transactions and cursors, or is there
some material difference between trimming the program down to just:

    res = PQexec(conn, "select * from pg_database");

Is there any value in my own query-only programs to declaring the cursor
for each search?

Many TIA,
Mark

--
Mark Harrison
Pixar Animation Studios


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

Предыдущее
От: "Arjen van der Meijden"
Дата:
Сообщение: Re: Making a tree with "millions and millions" of dynamic nodes
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: Triggers, Stored Procedures, PHP. was: Re: PostgreSQL