From 1ee26b776475155ad1fb00fa3ed0a93659ffadad Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 18 Jun 2000 22:44:35 +0000 Subject: 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. --- src/backend/optimizer/util/relnode.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) (limited to 'src/backend/optimizer/util/relnode.c') diff --git a/src/backend/optimizer/util/relnode.c b/src/backend/optimizer/util/relnode.c index da7059ce915..070fabf7669 100644 --- a/src/backend/optimizer/util/relnode.c +++ b/src/backend/optimizer/util/relnode.c @@ -8,14 +8,13 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/relnode.c,v 1.26 2000/04/12 17:15:24 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/relnode.c,v 1.27 2000/06/18 22:44:12 tgl Exp $ * *------------------------------------------------------------------------- */ #include "postgres.h" #include "optimizer/cost.h" -#include "optimizer/internal.h" #include "optimizer/joininfo.h" #include "optimizer/pathnode.h" #include "optimizer/plancat.h" @@ -76,26 +75,9 @@ get_base_rel(Query *root, int relid) rel->joininfo = NIL; rel->innerjoin = NIL; - if (relid < 0) - { - - /* - * If the relation is a materialized relation, assume constants - * for sizes. - */ - rel->pages = _NONAME_RELATION_PAGES_; - rel->tuples = _NONAME_RELATION_TUPLES_; - } - else - { - - /* - * Otherwise, retrieve relation statistics from the system - * catalogs. - */ - relation_info(root, relid, - &rel->indexed, &rel->pages, &rel->tuples); - } + /* Retrieve relation statistics from the system catalogs. */ + relation_info(root, relid, + &rel->indexed, &rel->pages, &rel->tuples); root->base_rel_list = lcons(rel, root->base_rel_list); -- cgit v1.2.3