postgresql/src/include/nodes
Tom Lane b3ff6c742f Use an explicit state flag to control PlaceHolderInfo creation.
Up to now, callers of find_placeholder_info() were required to pass
a flag indicating if it's OK to make a new PlaceHolderInfo.  That'd
be fine if the callers had free choice, but they do not.  Once we
begin deconstruct_jointree() it's no longer OK to make more PHIs;
while callers before that always want to create a PHI if it's not
there already.  So there's no freedom of action, only the opportunity
to cause bugs by creating PHIs too late.  Let's get rid of that in
favor of adding a state flag PlannerInfo.placeholdersFrozen, which
we can set at the point where it's no longer OK to make more PHIs.

This patch also simplifies a couple of call sites that were using
complicated logic to avoid calling find_placeholder_info() as much
as possible.  Now that that lookup is O(1) thanks to the previous
commit, the extra bitmap manipulations are probably a net negative.

Discussion: https://postgr.es/m/1405792.1660677844@sss.pgh.pa.us
2022-08-17 15:52:53 -04:00
..
.gitignore Automatically generate node support functions 2022-07-09 08:53:59 +02:00
bitmapset.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
execnodes.h Doc: rearrange high-level commentary about node support coverage. 2022-07-09 15:10:15 -04:00
extensible.h Automatically generate node support functions 2022-07-09 08:53:59 +02:00
lockoptions.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
makefuncs.h Rename JsonIsPredicate.value_type, fix JSON backend/nodes/ infrastructure. 2022-05-13 11:40:08 -04:00
memnodes.h Mark PlanState as an abstract node type. 2022-07-09 13:35:37 -04:00
nodeFuncs.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
nodes.h Add defenses against unexpected changes in the NodeTag enum list. 2022-07-12 11:22:52 -04:00
params.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
parsenodes.h Fix ENABLE/DISABLE TRIGGER to handle recursion correctly 2022-08-05 09:47:26 +02:00
pathnodes.h Use an explicit state flag to control PlaceHolderInfo creation. 2022-08-17 15:52:53 -04:00
pg_list.h Tidy up code in get_cheapest_group_keys_order() 2022-07-13 14:02:20 +12:00
plannodes.h Mark Scan as an abstract node type, too. 2022-07-09 13:58:06 -04:00
primnodes.h Improve performance of ORDER BY / DISTINCT aggregates 2022-08-02 23:11:45 +12:00
print.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
readfuncs.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
replnodes.h Fix limitations on what SQL commands can be issued to a walsender. 2022-01-24 15:33:38 -05:00
subscripting.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
supportnodes.h Teach planner and executor about monotonic window funcs 2022-04-08 10:34:36 +12:00
tidbitmap.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
value.h Automatically generate node support functions 2022-07-09 08:53:59 +02:00