1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +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

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.113 2000/04/12 17:15:16 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.114 2000/06/18 22:44:05 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -414,41 +414,6 @@ _copyHashJoin(HashJoin *from)
}
/* ----------------
* CopyNonameFields
*
* This function copies the fields of the Noname node. It is used by
* all the copy functions for classes which inherit from Noname.
* ----------------
*/
static void
CopyNonameFields(Noname *from, Noname *newnode)
{
newnode->nonameid = from->nonameid;
newnode->keycount = from->keycount;
return;
}
/* ----------------
* _copyNoname
* ----------------
*/
static Noname *
_copyNoname(Noname *from)
{
Noname *newnode = makeNode(Noname);
/* ----------------
* copy node superclass fields
* ----------------
*/
CopyPlanFields((Plan *) from, (Plan *) newnode);
CopyNonameFields(from, newnode);
return newnode;
}
/* ----------------
* _copyMaterial
* ----------------
@ -463,7 +428,6 @@ _copyMaterial(Material *from)
* ----------------
*/
CopyPlanFields((Plan *) from, (Plan *) newnode);
CopyNonameFields((Noname *) from, (Noname *) newnode);
return newnode;
}
@ -483,7 +447,8 @@ _copySort(Sort *from)
* ----------------
*/
CopyPlanFields((Plan *) from, (Plan *) newnode);
CopyNonameFields((Noname *) from, (Noname *) newnode);
newnode->keycount = from->keycount;
return newnode;
}
@ -552,7 +517,6 @@ _copyUnique(Unique *from)
* ----------------
*/
CopyPlanFields((Plan *) from, (Plan *) newnode);
CopyNonameFields((Noname *) from, (Noname *) newnode);
/* ----------------
* copy remainder of node
@ -1695,9 +1659,6 @@ copyObject(void *from)
case T_HashJoin:
retval = _copyHashJoin(from);
break;
case T_Noname:
retval = _copyNoname(from);
break;
case T_Material:
retval = _copyMaterial(from);
break;