diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-12-30 23:53:15 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-12-30 23:53:15 +0000 |
commit | be6c38b9033c546e2a8a9fab4329b89be57a263b (patch) | |
tree | 521c34b2c94d52614160a5582654751e089b226e /src/backend/nodes/copyfuncs.c | |
parent | 5e545151671fa4ab3cf0e62ffd1e207609ad1517 (diff) | |
download | postgresql-be6c38b9033c546e2a8a9fab4329b89be57a263b.tar.gz postgresql-be6c38b9033c546e2a8a9fab4329b89be57a263b.zip |
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.
Diffstat (limited to 'src/backend/nodes/copyfuncs.c')
-rw-r--r-- | src/backend/nodes/copyfuncs.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index ef4f0421e93..8b96f77a731 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -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); |