mirror of
https://github.com/postgres/postgres.git
synced 2025-07-09 22:41:56 +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:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.90 2000/06/16 05:27:03 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.91 2000/06/18 22:44:05 tgl Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Most of the read functions for plan nodes are tested. (In fact, they
|
||||
@ -555,38 +555,10 @@ _readTidScan()
|
||||
return local_node;
|
||||
}
|
||||
|
||||
/* ----------------
|
||||
* _readNoname
|
||||
*
|
||||
* Noname is a subclass of Plan
|
||||
* ----------------
|
||||
*/
|
||||
static Noname *
|
||||
_readNoname()
|
||||
{
|
||||
Noname *local_node;
|
||||
char *token;
|
||||
int length;
|
||||
|
||||
local_node = makeNode(Noname);
|
||||
|
||||
_getPlan((Plan *) local_node);
|
||||
|
||||
token = lsptok(NULL, &length); /* eat :nonameid */
|
||||
token = lsptok(NULL, &length); /* get nonameid */
|
||||
local_node->nonameid = atol(token);
|
||||
|
||||
token = lsptok(NULL, &length); /* eat :keycount */
|
||||
token = lsptok(NULL, &length); /* get keycount */
|
||||
local_node->keycount = atoi(token);
|
||||
|
||||
return local_node;
|
||||
}
|
||||
|
||||
/* ----------------
|
||||
* _readSort
|
||||
*
|
||||
* Sort is a subclass of Noname
|
||||
* Sort is a subclass of Plan
|
||||
* ----------------
|
||||
*/
|
||||
static Sort *
|
||||
@ -600,10 +572,6 @@ _readSort()
|
||||
|
||||
_getPlan((Plan *) local_node);
|
||||
|
||||
token = lsptok(NULL, &length); /* eat :nonameid */
|
||||
token = lsptok(NULL, &length); /* get nonameid */
|
||||
local_node->nonameid = atol(token);
|
||||
|
||||
token = lsptok(NULL, &length); /* eat :keycount */
|
||||
token = lsptok(NULL, &length); /* get keycount */
|
||||
local_node->keycount = atoi(token);
|
||||
@ -625,7 +593,7 @@ _readAgg()
|
||||
/* ----------------
|
||||
* _readHash
|
||||
*
|
||||
* Hash is a subclass of Noname
|
||||
* Hash is a subclass of Plan
|
||||
* ----------------
|
||||
*/
|
||||
static Hash *
|
||||
@ -1853,8 +1821,6 @@ parsePlanString(void)
|
||||
return_value = _readIndexScan();
|
||||
else if (length == 7 && strncmp(token, "TIDSCAN", length) == 0)
|
||||
return_value = _readTidScan();
|
||||
else if (length == 6 && strncmp(token, "NONAME", length) == 0)
|
||||
return_value = _readNoname();
|
||||
else if (length == 4 && strncmp(token, "SORT", length) == 0)
|
||||
return_value = _readSort();
|
||||
else if (length == 6 && strncmp(token, "AGGREG", length) == 0)
|
||||
|
Reference in New Issue
Block a user