Re: Is exec_simple_check_node still doing anything?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-06-25T17:48:35Z
Lists: pgsql-hackers
Attachments
- simplify-simple-expresssion-checking.patch (text/x-diff) patch
I wrote: > Robert Haas <robertmhaas@gmail.com> writes: >> I'm a little mystified by exec_simple_check_node(). >> ... >> Did that, possibly, remove the last way in which a simple expression >> could be could become non-simple? If so, between that and the new >> hasTargetSRFs test, it might now be impossible for >> exec_simple_check_node() to fail. > In fact, I suspect we could get rid of exec_simple_recheck_plan > altogether. It could use a bit more study, but the empty-rtable > check plus the other checks in exec_simple_check_plan (particularly, > hasAggs, hasWindowFuncs, hasTargetSRFs, hasSubLinks) seem like > they are enough to guarantee that what comes out of the planner > will be "simple". I did some more studying and it definitely seems like exec_simple_recheck_plan can never fail anymore. As an experimental check, converting everything it was testing into Asserts still gets through check-world. Accordingly, here's a proposed patch that gets rid of exec_simple_check_node() and simplifies some of the rest of the logic. regards, tom lane
Commits
-
Simplify plpgsql's check for simple expressions.
- 00418c612441 11.0 landed
-
Redesign the plancache mechanism for more flexibility and efficiency.
- e6faf910d750 9.2.0 cited
-
Make use of plancache module for SPI plans. In particular, since plpgsql
- 95f6d2d20921 8.3.0 cited