fix handling of inner/outer sortkeys in set_joinpath_distribution()
authorTomas Vondra <[email protected]>
Sun, 29 Jan 2017 18:15:29 +0000 (19:15 +0100)
committerTomas Vondra <[email protected]>
Sun, 29 Jan 2017 18:15:29 +0000 (19:15 +0100)
commite7542220d25fad39b753969296510893c9f9915d
tree2de856060375d28bd5b8fb3d24d04031e4949f65
parent5e13292c11990ae35f13cabdcc3588a90cd3fac5
fix handling of inner/outer sortkeys in set_joinpath_distribution()

We must not reset inner/outer sortkeys unless the path is actually
redistributed. When a redistribution is not needed, the merge join
needs the original values. Otherwise this results in errors like

    ERROR: inner pathkeys do not match mergeclauses
    ERROR: outer pathkeys do not match mergeclauses
src/backend/optimizer/util/pathnode.c