David Rowley <drow...@postgresql.org> writes: > Here we add a simple ORDER BY to stop the planner from being able to > pullup the lateral subquery.
Hmmm ... we have an agreed syntax for a subquery optimization fence, and that ain't it. I wouldn't count on this not breaking again in the future. Why not OFFSET 0, which is the usual method? regards, tom lane