diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 1999-08-16 02:17:58 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 1999-08-16 02:17:58 +0000 |
commit | e6381966c1886badbc19c94ac1f1ffbc104125ab (patch) | |
tree | 9da3d5d073dcb4cff68bdb69f6118409b5315512 /src/backend/optimizer/util/indexnode.c | |
parent | 08320bfb22b3ef006885de91f5163ef5fe831889 (diff) |
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.
Diffstat (limited to 'src/backend/optimizer/util/indexnode.c')
-rw-r--r-- | src/backend/optimizer/util/indexnode.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/backend/optimizer/util/indexnode.c b/src/backend/optimizer/util/indexnode.c index 6d175d6c036..4817232f2fb 100644 --- a/src/backend/optimizer/util/indexnode.c +++ b/src/backend/optimizer/util/indexnode.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/indexnode.c,v 1.19 1999/07/16 04:59:24 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/indexnode.c,v 1.20 1999/08/16 02:17:57 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -39,21 +39,20 @@ find_relation_indices(Query *root, RelOptInfo *rel) /* * find_secondary_index - * Creates a list of index path nodes containing information for each + * Creates a list of RelOptInfo nodes containing information for each * secondary index defined on a relation by searching through the index * catalog. * * 'relid' is the OID of the relation for which indices are being located * - * Returns a list of new index nodes. - * + * Returns a list of new index RelOptInfo nodes. */ static List * find_secondary_index(Query *root, Oid relid) { IdxInfoRetval indexinfo; List *indexes = NIL; - bool first = TRUE; + bool first = true; while (index_info(root, first, relid, &indexinfo)) { @@ -63,9 +62,9 @@ find_secondary_index(Query *root, Oid relid) indexnode->relam = indexinfo.relam; indexnode->pages = indexinfo.pages; indexnode->tuples = indexinfo.tuples; + indexnode->classlist = indexinfo.classlist; indexnode->indexkeys = indexinfo.indexkeys; indexnode->ordering = indexinfo.orderOprs; - indexnode->classlist = indexinfo.classlist; indexnode->indproc = indexinfo.indproc; indexnode->indpred = (List *) indexinfo.indpred; @@ -81,7 +80,7 @@ find_secondary_index(Query *root, Oid relid) indexnode->innerjoin = NIL; indexes = lcons(indexnode, indexes); - first = FALSE; + first = false; } return indexes; |