Fix LATERAL join test in test memoize.sql
authorDavid Rowley <[email protected]>
Mon, 23 Jan 2023 23:30:30 +0000 (12:30 +1300)
committerDavid Rowley <[email protected]>
Mon, 23 Jan 2023 23:30:30 +0000 (12:30 +1300)
commitb762fed6481e722a022ac2bea02151e080c31fa6
treee08c8fc2808ebda23014c34c3049c627f201723c
parent8dd43894b1f5c0148dd36308fc607bfcc909e5bd
Fix LATERAL join test in test memoize.sql

The test in question was meant to be testing Memoize to ensure it worked
correctly when the inner side of the join contained lateral vars, however,
nothing in the lateral subquery stopped it from being pulled up into the
main query, so the planner did that, and that meant no more lateral vars.

Here we add a simple ORDER BY to stop the planner from being able to
pullup the lateral subquery.

Author: Richard Guo
Discussion: https://postgr.es/m/CAMbWs4_LHJaN4L-tXpKMiPFnsCJWU1P8Xh59o0W7AA6UN99=cQ@mail.gmail.com
Back-through: 14, where Memoize was added.
src/test/regress/expected/memoize.out
src/test/regress/sql/memoize.sql