Re: portal pinning - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: portal pinning
Date
Msg-id dda52d44-da5a-bb3a-6870-35b40e76d1bf@2ndquadrant.com
Whole thread Raw
In response to portal pinning  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: portal pinning
List pgsql-hackers
On 12/12/17 10:34, Peter Eisentraut wrote:
> But I also wonder whether we shouldn't automatically pin/unpin portals
> in SPI_cursor_open() and SPI_cursor_close().  This makes sense if you
> consider "pinned" to mean "internally generated".  I don't think there
> is a scenario in which user code should directly operate on a portal
> created by SPI.

Here is a patch for this option.

The above sentence was not quite correct.  Only unnamed portals should
be pinned automatically.  Named portals are of course possible to be
passed around as refcursors for example.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Top-N sorts verses parallelism
Next
From: Tom Lane
Date:
Subject: Re: Bug: Ambiguous Column Reference Allowed When Joining to pg_roles.oid