diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-07-02 23:00:42 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-07-02 23:00:42 +0000 |
commit | cc5e80b8d1c4bf86aa99b54c938e9048e10bf93a (patch) | |
tree | 6288e2b3bf66c8b1d30ee6db9b7846251d5ad95a /src/backend/nodes/copyfuncs.c | |
parent | ea1e2b948d2dcbd40fb9053e74ae2da27cfd425e (diff) | |
download | postgresql-cc5e80b8d1c4bf86aa99b54c938e9048e10bf93a.tar.gz postgresql-cc5e80b8d1c4bf86aa99b54c938e9048e10bf93a.zip |
Teach planner about some cases where a restriction clause can be
propagated inside an outer join. In particular, given
LEFT JOIN ON (A = B) WHERE A = constant, we cannot conclude that
B = constant at the top level (B might be null instead), but we
can nonetheless put a restriction B = constant into the quals for
B's relation, since no inner-side rows not meeting that condition
can contribute to the final result. Similarly, given
FULL JOIN USING (J) WHERE J = constant, we can't directly conclude
that either input J variable = constant, but it's OK to push such
quals into each input rel. Per recent gripe from Kim Bisgaard.
Along the way, remove 'valid_everywhere' flag from RestrictInfo,
as on closer analysis it was not being used for anything, and was
defined backwards anyway.
Diffstat (limited to 'src/backend/nodes/copyfuncs.c')
-rw-r--r-- | src/backend/nodes/copyfuncs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index ce16d2eba18..8d42cead085 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.310 2005/06/28 05:08:56 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.311 2005/07/02 23:00:39 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1249,7 +1249,6 @@ _copyRestrictInfo(RestrictInfo *from) COPY_NODE_FIELD(clause); COPY_SCALAR_FIELD(is_pushed_down); - COPY_SCALAR_FIELD(valid_everywhere); COPY_SCALAR_FIELD(can_join); COPY_BITMAPSET_FIELD(clause_relids); COPY_BITMAPSET_FIELD(required_relids); |