1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Allow internal sorts to be stored in memory rather than in files.

This commit is contained in:
Bruce Momjian
1997-08-06 03:42:21 +00:00
parent 3bea7b138b
commit f5f366e188
11 changed files with 633 additions and 516 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.5 1996/11/10 02:59:54 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.6 1997/08/06 03:41:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -374,6 +374,18 @@ ExecMergeTupleDump(ExprContext *econtext, MergeJoinState *mergestate)
printf("******** \n");
}
static void
CleanUpSort(Plan *plan) {
if (plan == NULL)
return;
if (plan->type == T_Sort) {
Sort *sort = (Sort *)plan;
psort_end(sort);
}
}
/* ----------------------------------------------------------------
* ExecMergeJoin
*
@ -676,6 +688,8 @@ ExecMergeJoin(MergeJoin *node)
*/
if (TupIsNull(outerTupleSlot)) {
MJ_printf("ExecMergeJoin: **** outer tuple is nil ****\n");
CleanUpSort(node->join.lefttree->lefttree);
CleanUpSort(node->join.righttree->lefttree);
return NULL;
}