diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-11-30 20:51:25 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-11-30 20:51:25 +0000 |
| commit | c1f3073333d01987ac9c3e5f6c197b9e2afc3ba9 (patch) | |
| tree | b70ddff5404c442ec13a5c182346984d4300f6da /src/backend/tcop/pquery.c | |
| parent | 3f936aacc057e4b391ab953fea2ffb689a12a8bc (diff) | |
| download | postgresql-c1f3073333d01987ac9c3e5f6c197b9e2afc3ba9.tar.gz | |
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/tcop/pquery.c')
| -rw-r--r-- | src/backend/tcop/pquery.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c index f382c73721..2a9764ac8b 100644 --- a/src/backend/tcop/pquery.c +++ b/src/backend/tcop/pquery.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.125 2008/11/19 01:10:23 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/pquery.c,v 1.126 2008/11/30 20:51:25 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -18,6 +18,7 @@ #include "access/xact.h" #include "commands/prepare.h" #include "commands/trigger.h" +#include "executor/tstoreReceiver.h" #include "miscadmin.h" #include "pg_trace.h" #include "tcop/pquery.h" @@ -1032,7 +1033,10 @@ FillPortalStore(Portal portal, bool isTopLevel) char completionTag[COMPLETION_TAG_BUFSIZE]; PortalCreateHoldStore(portal); - treceiver = CreateDestReceiver(DestTuplestore, portal); + treceiver = CreateDestReceiver(DestTuplestore); + SetTuplestoreDestReceiverParams(treceiver, + portal->holdStore, + portal->holdContext); completionTag[0] = '\0'; |
