Re: Soon-to-be-broken regression test case

2018-10-11 Thread Tom Lane
David Rowley writes: > I guess if we ever did something to break that then we'd need to not > do anything when there are volatile functions present. Yeah, nothing I'm doing here changes the rule that we don't flatten sub-selects containing volatiles in their tlist. > If people are > writing that

Re: Soon-to-be-broken regression test case

2018-10-11 Thread David Rowley
On 12 October 2018 at 05:52, Alvaro Herrera wrote: > On 2018-Oct-11, Tom Lane wrote: > >> Hm, I'm not seeing any regression test result changes there. However, >> if you're just executing queries and not EXPLAIN'ing them, it's possible >> something unwanted is happening under the hood. > > Hmm, n

Re: Soon-to-be-broken regression test case

2018-10-11 Thread Tom Lane
Alvaro Herrera writes: > On 2018-Oct-11, Tom Lane wrote: >> Hm, I'm not seeing any regression test result changes there. However, >> if you're just executing queries and not EXPLAIN'ing them, it's possible >> something unwanted is happening under the hood. > Hmm, no, the explains are there. Her

Re: Soon-to-be-broken regression test case

2018-10-11 Thread Alvaro Herrera
On 2018-Oct-11, Tom Lane wrote: > Hm, I'm not seeing any regression test result changes there. However, > if you're just executing queries and not EXPLAIN'ing them, it's possible > something unwanted is happening under the hood. Hmm, no, the explains are there. Here's one example -- maybe your

Re: Soon-to-be-broken regression test case

2018-10-11 Thread Tom Lane
Alvaro Herrera writes: > On 2018-Oct-11, Tom Lane wrote: >> I have been fooling around with a patch to allow pull-up of sub-selects >> that lack any FROM, along the lines discussed in >> https://www.postgresql.org/message-id/15944.1521127...@sss.pgh.pa.us >> I find that it is smart enough to reduc

Re: Soon-to-be-broken regression test case

2018-10-11 Thread Alvaro Herrera
On 2018-Oct-11, Tom Lane wrote: > I have been fooling around with a patch to allow pull-up of sub-selects > that lack any FROM, along the lines discussed in > https://www.postgresql.org/message-id/15944.1521127...@sss.pgh.pa.us > I find that it is smart enough to reduce that EXISTS to a plain > ex

Soon-to-be-broken regression test case

2018-10-11 Thread Tom Lane
The last test case in select_parallel.sql, added in commit dc1057fc, currently generates a plan like this: CREATE VIEW tenk1_vw_sec WITH (security_barrier) AS SELECT * FROM tenk1; EXPLAIN (COSTS OFF) SELECT 1 FROM tenk1_vw_sec WHERE EXISTS (SELECT 1 WHERE unique1 = 0);