Prepared queries and portals

Поиск
Список
Период
Сортировка
От Cyril VELTER
Тема Prepared queries and portals
Дата
Msg-id 02c401c40160$6304be80$f901a8c0@cvfixe
обсуждение исходный текст
Ответ на Re: simple make check failures  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Prepared queries and portals  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
   While adapting an application to make use of the new protocol, I've
faced one problem. I cannot execute a prepared query and fetch the result in
several time. The multiple fetch is accessible with cursor in SQL but I
haven't found any way to execute a prepared query in a cursor.
   The documentation clearly state that the protocol support this beahvior,
so I've modified libpq to handle the case by adding to functions :


PQexecPreparedPortal(conn,stmtName,portalName,nParams,paramValues,paramlengt
h,paramFormats,resultFormat,maxrows);
   and
   PQfetchPortal(conn,portalName,maxrows)

   PQexecPreparedPortal is a PQexecPrepared clone but you can specify the
portal in which the result should be put (which might be the unnamed one)
and the maximum number of rows to retreive after the execution.
   PQfetchPortal fetch the next rows.
   This works nicely. I would like to see this included in the standard
libpq, and will submit a patch if this might be usefull, but as it extend
the libpq API there might be more general plan to support the functionality.
   Any comments ?

   cyril



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

Предыдущее
От: "Simon Riggs"
Дата:
Сообщение: Re: [PERFORM] WAL Optimisation - configuration and usage
Следующее
От: "Simon Riggs"
Дата:
Сообщение: The Return of PITR