Re: patch to create system view that lists cursors

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: patch to create system view that lists cursors
Дата
Msg-id 1137105579.9143.159.camel@localhost.localdomain
обсуждение исходный текст
Ответ на patch to create system view that lists cursors  (Joachim Wieland <joe@mcknight.de>)
Ответы Re: patch to create system view that lists cursors
Re: patch to create system view that lists cursors
Список pgsql-patches
On Thu, 2006-01-12 at 10:51 +0100, Joachim Wieland wrote:
> Attached is a patch to create a new system view pg_cursors to list all
> available cursors to the current session and transaction.

+ /* loop until we find a named portal or hit the end of the list */
+ while ((hentry = hash_seq_search(hash_seq)) != NULL)
+ {
+     portal = hentry->portal;
+     /* there can be a named portal created by CreateNewPortal, its
name
+      * will be "<unnamed portal n>" (see CreateNewPortal function in
this
+      * file). Those have a status of PORTAL_NEW. The status of cursors
is
+      * PORTAL_READY however. */
+     if (portal->status != PORTAL_READY)
+         continue;
+     if (portal->name[0] != '\0')
+         break;
+ }

I think it is worth distinguishing more clearly between portals that
should be displayed to the user and those that should not (which might
be labelled "internal cursors", perhaps). The tests above seem fairly
ad-hoc.

Barring any objections, I'll implement the above and apply the revised
patch tomorrow.

-Neil



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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: mbutils.c memory cxt cleanup
Следующее
От: Tom Lane
Дата:
Сообщение: Re: patch to create system view that lists cursors