aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/portalcmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/portalcmds.c')
-rw-r--r--src/backend/commands/portalcmds.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/backend/commands/portalcmds.c b/src/backend/commands/portalcmds.c
index 0fefb66174f..4c23e86bafb 100644
--- a/src/backend/commands/portalcmds.c
+++ b/src/backend/commands/portalcmds.c
@@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/portalcmds.c,v 1.57.2.1 2007/02/06 22:49:30 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/portalcmds.c,v 1.57.2.2 2008/12/01 17:06:35 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,6 +26,7 @@
#include "access/xact.h"
#include "commands/portalcmds.h"
#include "executor/executor.h"
+#include "executor/tstoreReceiver.h"
#include "optimizer/planner.h"
#include "rewrite/rewriteHandler.h"
#include "tcop/pquery.h"
@@ -375,8 +376,12 @@ PersistHoldablePortal(Portal portal)
*/
ExecutorRewind(queryDesc);
- /* Change the destination to output to the tuplestore */
+ /*
+ * Change the destination to output to the tuplestore. Note we
+ * tell the tuplestore receiver to detoast all data passed through it.
+ */
queryDesc->dest = CreateDestReceiver(DestTuplestore, portal);
+ SetTuplestoreDestReceiverDeToast(queryDesc->dest, true);
/* Fetch the result set into the tuplestore */
ExecutorRun(queryDesc, ForwardScanDirection, 0L);