aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/spi.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2018-01-10 16:01:17 -0500
committerPeter Eisentraut <peter_e@gmx.net>2018-01-10 16:01:17 -0500
commitb48b2f8793ef256d19274b4ef6ff587fd47ab553 (patch)
tree293394967dd64aa3aca2d73c3826df02ca297b78 /src/backend/executor/spi.c
parent3afd75eaac8aaccf5aeebc52548c396b84d85516 (diff)
downloadpostgresql-b48b2f8793ef256d19274b4ef6ff587fd47ab553.tar.gz
postgresql-b48b2f8793ef256d19274b4ef6ff587fd47ab553.zip
Revert "Move portal pinning from PL/pgSQL to SPI"
This reverts commit b3617cdfbba1b5381e9d1c6bc0839500e8eb7273. This broke returning unnamed cursors from PL/pgSQL functions. Apparently, there are no test cases for this.
Diffstat (limited to 'src/backend/executor/spi.c')
-rw-r--r--src/backend/executor/spi.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c
index 96370513e80..995f67d2662 100644
--- a/src/backend/executor/spi.c
+++ b/src/backend/executor/spi.c
@@ -1175,12 +1175,6 @@ SPI_cursor_open_internal(const char *name, SPIPlanPtr plan,
{
/* Use a random nonconflicting name */
portal = CreateNewPortal();
-
- /*
- * Make sure the portal doesn't get closed by the user statements we
- * execute.
- */
- PinPortal(portal);
}
else
{
@@ -1419,9 +1413,6 @@ SPI_cursor_close(Portal portal)
if (!PortalIsValid(portal))
elog(ERROR, "invalid portal in SPI cursor operation");
- if (portal->portalPinned)
- UnpinPortal(portal);
-
PortalDrop(portal, false);
}