Re: Check volatile functions in ppi_clauses for memoize node

2023-08-07 Thread Richard Guo
On Mon, Aug 7, 2023 at 6:19 PM David Rowley wrote: > On Fri, 4 Aug 2023 at 22:26, Richard Guo wrote: > > explain (costs off) > > select * from t t1 left join lateral > > (select t1.a as t1a, t2.a as t2a from t t2) s > > on t1.a = s.t2a + random(); > > QUERY PLAN > > ---

Re: Check volatile functions in ppi_clauses for memoize node

2023-08-07 Thread David Rowley
On Fri, 4 Aug 2023 at 22:26, Richard Guo wrote: > explain (costs off) > select * from t t1 left join lateral > (select t1.a as t1a, t2.a as t2a from t t2) s > on t1.a = s.t2a + random(); > QUERY PLAN > --- > Nested Loop Left Join >

Check volatile functions in ppi_clauses for memoize node

2023-08-04 Thread Richard Guo
In get_memoize_path() we have a theory about avoiding memoize node if there are volatile functions in the inner rel's target/restrict list. /* * We can't use a memoize node if there are volatile functions in the * inner rel's target list or restrict list. A cache hit could reduce the * num