1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00

Reimplement nodeMaterial to use a temporary BufFile (or even memory, if the

materialized tupleset is small enough) instead of a temporary relation.
This was something I was thinking of doing anyway for performance, and Jan
says he needs it for TOAST because he doesn't want to cope with toasting
noname relations.  With this change, the 'noname table' support in heap.c
is dead code, and I have accordingly removed it.  Also clean up 'noname'
plan handling in planner --- nonames are either sort or materialize plans,
and it seems less confusing to handle them separately under those names.
This commit is contained in:
Tom Lane
2000-06-18 22:44:35 +00:00
parent 2c0edb3c86
commit 1ee26b7764
32 changed files with 1090 additions and 982 deletions

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: execnodes.h,v 1.41 2000/04/12 17:16:39 momjian Exp $
* $Id: execnodes.h,v 1.42 2000/06/18 22:44:29 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -565,11 +565,9 @@ typedef struct HashJoinState
* MaterialState information
*
* materialize nodes are used to materialize the results
* of a subplan into a temporary relation.
* of a subplan into a temporary file.
*
* Flag indicated whether subplan has been materialized
* TempRelation temporary relation containing result of executing
* the subplan.
* tuplestorestate private state of tuplestore.c
*
* CommonScanState information
*
@ -590,8 +588,7 @@ typedef struct HashJoinState
typedef struct MaterialState
{
CommonScanState csstate; /* its first field is NodeTag */
bool mat_Flag;
Relation mat_TempRelation;
void *tuplestorestate;
} MaterialState;
/* ---------------------