pg_plan_advice: Fix a bug when a subquery is pruned away entirely. If a subquery is proven empty, and if that subquery contained a semijoin, and if making one side or the other of that semijoin unique and performing an inner join was a possible strategy, then the previous code would fail with ERROR: no rtoffset for plan %s when attempting to generate advice. Fix that.
Reported-by: Alexander Lakhin <[email protected]> Discussion: http://postgr.es/m/ca+tgmoboommxsjz3e+cjty-ba1+w0dqvdqzxubevgtw62wh...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/0f93ebb3112d562fe54b685d0ca08c5ba1b41467 Modified Files -------------- contrib/pg_plan_advice/expected/semijoin.out | 17 +++++++++++++++++ contrib/pg_plan_advice/pgpa_planner.c | 28 ++++++++++++++++------------ contrib/pg_plan_advice/sql/semijoin.sql | 9 +++++++++ 3 files changed, 42 insertions(+), 12 deletions(-)
