From e6381966c1886badbc19c94ac1f1ffbc104125ab Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 16 Aug 1999 02:17:58 +0000 Subject: Major planner/optimizer revision: get rid of PathOrder node type, store all ordering information in pathkeys lists (which are now lists of lists of PathKeyItem nodes, not just lists of lists of vars). This was a big win --- the code is smaller and IMHO more understandable than it was, even though it handles more cases. I believe the node changes will not force an initdb for anyone; planner nodes don't show up in stored rules. --- src/backend/optimizer/path/allpaths.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) (limited to 'src/backend/optimizer/path/allpaths.c') diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 6e59451e558..23c759bd6e6 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.52 1999/07/30 22:34:17 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.53 1999/08/16 02:17:50 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -331,32 +331,14 @@ print_path(Query *root, Path *path, int indent) int size = path->parent->size; int relid = lfirsti(path->parent->relids); - printf("%s(%d) size=%d cost=%f", + printf("%s(%d) size=%d cost=%f\n", ptype, relid, size, path->path_cost); - if (nodeTag(path) == T_IndexPath) + if (IsA(path, IndexPath)) { - List *k, - *l; - - printf(" pathkeys="); - foreach(k, path->pathkeys) - { - printf("("); - foreach(l, lfirst(k)) - { - Var *var = lfirst(l); - - printf("%d.%d", var->varnoold, var->varoattno); - if (lnext(l)) - printf(", "); - } - printf(")"); - if (lnext(k)) - printf(", "); - } + printf(" pathkeys="); + print_pathkeys(path->pathkeys, root->rtable); } - printf("\n"); } } -- cgit v1.2.3