1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +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

@ -11,7 +11,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/optimizer/path/pathkeys.c,v 1.64 2005/01/23 02:21:26 tgl Exp $
* $PostgreSQL: pgsql/src/backend/optimizer/path/pathkeys.c,v 1.65 2005/03/27 06:29:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -648,7 +648,6 @@ get_cheapest_fractional_path_for_pathkeys(List *paths,
*/
List *
build_index_pathkeys(Query *root,
RelOptInfo *rel,
IndexOptInfo *index,
ScanDirection scandir)
{
@ -675,7 +674,8 @@ build_index_pathkeys(Query *root,
if (*indexkeys != 0)
{
/* simple index column */
indexkey = (Node *) find_indexkey_var(root, rel, *indexkeys);
indexkey = (Node *) find_indexkey_var(root, index->rel,
*indexkeys);
}
else
{