diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-09-28 16:13:09 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-09-28 16:13:09 -0400 |
commit | a2e26a6f888a91da7efd7f59ca5d9b9383f2edd1 (patch) | |
tree | a9dc7c5e0893b0ca7dc67c231878c82a29bb04ad | |
parent | 3e20490e862f9da0d7530b8bac80bcb9a5c05cac (diff) |
Fix incorrect usage of non-strict OR joinclauses in appendrel indexscans.
By chance I happened to notice that bug #5076 was still broken in the
8.3 branch, though it worked everywhere else. The reason is that 8.3's
version of adjust_appendrel_attrs_mutator neglected to adjust
RestrictInfo.nullable_relids. This was an oversight in my patch of
2009-04-16, which I apparently corrected in the later branches on
2009-08-13 without realizing that it affected the 8.3 branch as well.
By the time the bug report was filed, it was not reproducible in 8.4.
I don't recall if I wrote it off as already fixed, or it just fell through
the cracks; but anyway it's been a live bug in 8.3 for a year.
-rw-r--r-- | src/backend/optimizer/prep/prepunion.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c index 2779da74d0a..687677e960c 100644 --- a/src/backend/optimizer/prep/prepunion.c +++ b/src/backend/optimizer/prep/prepunion.c @@ -1207,6 +1207,9 @@ adjust_appendrel_attrs_mutator(Node *node, AppendRelInfo *context) newinfo->required_relids = adjust_relid_set(oldinfo->required_relids, context->parent_relid, context->child_relid); + newinfo->nullable_relids = adjust_relid_set(oldinfo->nullable_relids, + context->parent_relid, + context->child_relid); newinfo->left_relids = adjust_relid_set(oldinfo->left_relids, context->parent_relid, context->child_relid); |