mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Adjust the definition of RestrictInfo's left_relids and right_relids
fields: now they are valid whenever the clause is a binary opclause, not only when it is a potential join clause (there is a new boolean field canjoin to signal the latter condition). This lets us avoid recomputing the relid sets over and over while examining indexes. Still more work to do to make this as useful as it could be, because there are places that could use the info but don't have access to the RestrictInfo node.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.210 2003/11/29 19:51:49 pgsql Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.211 2003/12/30 23:53:14 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -563,16 +563,9 @@ _equalRestrictInfo(RestrictInfo *a, RestrictInfo *b)
|
||||
COMPARE_SCALAR_FIELD(ispusheddown);
|
||||
|
||||
/*
|
||||
* We ignore subclauseindices, eval_cost, this_selec,
|
||||
* left/right_relids, left/right_pathkey, and left/right_bucketsize,
|
||||
* since they may not be set yet, and should be derivable from the
|
||||
* clause anyway. Probably it's not really necessary to compare any
|
||||
* of these remaining fields ...
|
||||
* We ignore all the remaining fields, since they may not be set yet,
|
||||
* and should be derivable from the clause anyway.
|
||||
*/
|
||||
COMPARE_SCALAR_FIELD(mergejoinoperator);
|
||||
COMPARE_SCALAR_FIELD(left_sortop);
|
||||
COMPARE_SCALAR_FIELD(right_sortop);
|
||||
COMPARE_SCALAR_FIELD(hashjoinoperator);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user