mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +03:00
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.
This commit is contained in:
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user