mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +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:
@@ -15,7 +15,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.269 2003/11/29 19:51:49 pgsql Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.270 2003/12/30 23:53:14 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1169,11 +1169,12 @@ _copyRestrictInfo(RestrictInfo *from)
|
||||
|
||||
COPY_NODE_FIELD(clause);
|
||||
COPY_SCALAR_FIELD(ispusheddown);
|
||||
COPY_SCALAR_FIELD(canjoin);
|
||||
COPY_BITMAPSET_FIELD(left_relids);
|
||||
COPY_BITMAPSET_FIELD(right_relids);
|
||||
COPY_NODE_FIELD(subclauseindices); /* XXX probably bad */
|
||||
COPY_SCALAR_FIELD(eval_cost);
|
||||
COPY_SCALAR_FIELD(this_selec);
|
||||
COPY_BITMAPSET_FIELD(left_relids);
|
||||
COPY_BITMAPSET_FIELD(right_relids);
|
||||
COPY_SCALAR_FIELD(mergejoinoperator);
|
||||
COPY_SCALAR_FIELD(left_sortop);
|
||||
COPY_SCALAR_FIELD(right_sortop);
|
||||
|
||||
Reference in New Issue
Block a user