1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-22 12:22:45 +03:00

Add a back-link from IndexOptInfo structs to their parent RelOptInfo

structs.  There are many places in the planner where we were passing
both a rel and an index to subroutines, and now need only pass the
index struct.  Notationally simpler, and perhaps a tad faster.
This commit is contained in:
Tom Lane
2005-03-27 06:29:49 +00:00
parent febc9a613c
commit 926e8a00d3
11 changed files with 95 additions and 141 deletions

View File

@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/util/plancat.c,v 1.101 2005/03/24 19:14:49 tgl Exp $
* $PostgreSQL: pgsql/src/backend/optimizer/util/plancat.c,v 1.102 2005/03/27 06:29:42 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -124,6 +124,7 @@ get_relation_info(Oid relationObjectId, RelOptInfo *rel)
info = makeNode(IndexOptInfo);
info->indexoid = index->indexrelid;
info->rel = rel;
info->ncolumns = ncolumns = index->indnatts;
/*