Add basic regression tests for semi/antijoin recognition.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 31 Oct 2022 23:52:33 +0000 (19:52 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 31 Oct 2022 23:52:33 +0000 (19:52 -0400)
commit0043aa6b8597809b19c420cb5e635b4d832adccc
treef5ba707299c18900129672733e14a3424728d677
parent0717f2fedb2400e4f5bf89bcd463c8b32916ca26
Add basic regression tests for semi/antijoin recognition.

Add some simple tests that the planner recognizes all the
standard idioms for SEMI and ANTI joins.  Failure to optimize
in this way won't necessarily cause any visible change in
query results, so check the plans.  We had no similar coverage
before, at least for some variants of antijoin, as noted by
Richard Guo.

Discussion: https://postgr.es/m/CAMbWs4-mvPPCJ1W6iK6dD5HiNwoJdi6mZp=-7mE8N9Sh+cd0tQ@mail.gmail.com
src/test/regress/expected/join.out
src/test/regress/sql/join.sql