Skip site navigation (1) Skip section navigation (2)

Re: patch to create system view that lists cursors

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Joachim Wieland <joe(at)mcknight(dot)de>, pgsql-patches(at)postgresql(dot)org
Subject: Re: patch to create system view that lists cursors
Date: 2006-01-17 06:28:10
Message-ID: 1137479290.9145.91.camel@localhost.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
On Sun, 2006-01-15 at 17:57 -0500, Neil Conway wrote:
> I think the view should include the portals created by DECLARE CURSOR
> and "Bind" protocol messages, but should not include the unnamed portal
> or any other portals that are created internally as part of the
> implementation of other commands (e.g. EXECUTE). I'm not sure how to
> handle SPI: developers using SPI would expect to find their portals in
> the view, but those using SPI indirectly (e.g. via PL/foo) would
> probably find the clutter surprising. I'd say we need to include SPI
> portals in the view as well.

Attached is a revised version of Joachim's patch that implements this.
Cursors created via SPI are part of the view, which produces somewhat
unexpected results when querying the view from a procedural language as
noted above, but I suppose it's the best compromise.

The documentation still needs some work. Barring any objections, I'll
fix that and a few other minor issues and then apply the patch tomorrow.


Attachment: pg_get_cursors-3.diff
Description: text/x-patch (26.6 KB)

In response to


pgsql-patches by date

Next:From: Neil ConwayDate: 2006-01-17 07:00:12
Subject: Re: TupleDesc refcounting
Previous:From: ITAGAKI TakahiroDate: 2006-01-17 01:17:04
Subject: Re: Index padding optimization

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group