aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/spi.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-11-30 20:51:25 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-11-30 20:51:25 +0000
commitc1f3073333d01987ac9c3e5f6c197b9e2afc3ba9 (patch)
treeb70ddff5404c442ec13a5c182346984d4300f6da /src/backend/executor/spi.c
parent3f936aacc057e4b391ab953fea2ffb689a12a8bc (diff)
downloadpostgresql-c1f3073333d01987ac9c3e5f6c197b9e2afc3ba9.tar.gz
postgresql-c1f3073333d01987ac9c3e5f6c197b9e2afc3ba9.zip
Clean up the API for DestReceiver objects by eliminating the assumption
that a Portal is a useful and sufficient additional argument for CreateDestReceiver --- it just isn't, in most cases. Instead formalize the approach of passing any needed parameters to the receiver separately. One unexpected benefit of this change is that we can declare typedef Portal in a less surprising location. This patch is just code rearrangement and doesn't change any functionality. I'll tackle the HOLD-cursor-vs-toast problem in a follow-on patch.
Diffstat (limited to 'src/backend/executor/spi.c')
-rw-r--r--src/backend/executor/spi.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c
index 9cf119eaed9..af475892e47 100644
--- a/src/backend/executor/spi.c
+++ b/src/backend/executor/spi.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.200 2008/11/02 01:45:28 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.201 2008/11/30 20:51:25 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1227,7 +1227,7 @@ SPI_cursor_fetch(Portal portal, bool forward, long count)
{
_SPI_cursor_operation(portal,
forward ? FETCH_FORWARD : FETCH_BACKWARD, count,
- CreateDestReceiver(DestSPI, NULL));
+ CreateDestReceiver(DestSPI));
/* we know that the DestSPI receiver doesn't need a destroy call */
}
@@ -1256,7 +1256,7 @@ SPI_scroll_cursor_fetch(Portal portal, FetchDirection direction, long count)
{
_SPI_cursor_operation(portal,
direction, count,
- CreateDestReceiver(DestSPI, NULL));
+ CreateDestReceiver(DestSPI));
/* we know that the DestSPI receiver doesn't need a destroy call */
}
@@ -1744,8 +1744,7 @@ _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI,
if (!read_only)
CommandCounterIncrement();
- dest = CreateDestReceiver(canSetTag ? DestSPI : DestNone,
- NULL);
+ dest = CreateDestReceiver(canSetTag ? DestSPI : DestNone);
if (snapshot == InvalidSnapshot)
{