Commit adaf342
committed
Improve ruleutils' printout of LATERAL references within subplans.
Commit 1cc29fe, which taught EXPLAIN to print PARAM_EXEC Params as
the referenced expressions, included some checks to prevent matching
Params found in SubPlans or InitPlans to NestLoopParams of upper query
levels. At the time, this seemed possibly necessary to avoid false
matches because of the planner's habit of re-using the same PARAM_EXEC
slot in multiple places in a plan. Furthermore, in the absence of
LATERAL no such reference could be valid anyway. But it's possible
now that we have LATERAL, and in the wake of 46c508f and 1db5667
I believe the false-match hazard is gone. Hence, remove the
in_same_plan_level checks. As shown in the regression test changes,
this provides a useful improvement in readability for EXPLAIN of
LATERAL-using subplans.
Richard Guo, reviewed by Greg Stark and myself
Discussion: https://postgr.es/m/CAMbWs4-YSOcQXAagJetP95cAeZPqzOy5kM5yijG0PVW5ztRb4w@mail.gmail.com1 parent 5db195f commit adaf342
File tree
3 files changed
+9
-34
lines changed- src
- backend/utils/adt
- test/regress/expected
3 files changed
+9
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7896 | 7896 | | |
7897 | 7897 | | |
7898 | 7898 | | |
7899 | | - | |
7900 | 7899 | | |
7901 | 7900 | | |
7902 | 7901 | | |
7903 | 7902 | | |
7904 | | - | |
7905 | 7903 | | |
7906 | 7904 | | |
7907 | 7905 | | |
7908 | 7906 | | |
7909 | 7907 | | |
7910 | 7908 | | |
7911 | 7909 | | |
7912 | | - | |
7913 | | - | |
7914 | | - | |
| 7910 | + | |
7915 | 7911 | | |
7916 | 7912 | | |
7917 | | - | |
7918 | | - | |
| 7913 | + | |
7919 | 7914 | | |
7920 | 7915 | | |
7921 | 7916 | | |
| |||
7973 | 7968 | | |
7974 | 7969 | | |
7975 | 7970 | | |
7976 | | - | |
7977 | | - | |
7978 | | - | |
7979 | 7971 | | |
7980 | 7972 | | |
7981 | 7973 | | |
7982 | 7974 | | |
7983 | 7975 | | |
7984 | | - | |
7985 | | - | |
7986 | | - | |
7987 | | - | |
| 7976 | + | |
| 7977 | + | |
7988 | 7978 | | |
7989 | | - | |
7990 | | - | |
7991 | | - | |
7992 | | - | |
7993 | | - | |
7994 | | - | |
7995 | | - | |
7996 | | - | |
7997 | | - | |
7998 | | - | |
7999 | | - | |
8000 | | - | |
8001 | | - | |
8002 | | - | |
8003 | | - | |
8004 | 7979 | | |
8005 | 7980 | | |
8006 | 7981 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6074 | 6074 | | |
6075 | 6075 | | |
6076 | 6076 | | |
6077 | | - | |
6078 | | - | |
| 6077 | + | |
| 6078 | + | |
6079 | 6079 | | |
6080 | 6080 | | |
6081 | 6081 | | |
| |||
6096 | 6096 | | |
6097 | 6097 | | |
6098 | 6098 | | |
6099 | | - | |
| 6099 | + | |
6100 | 6100 | | |
6101 | 6101 | | |
6102 | | - | |
| 6102 | + | |
6103 | 6103 | | |
6104 | 6104 | | |
6105 | 6105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1155 | 1155 | | |
1156 | 1156 | | |
1157 | 1157 | | |
1158 | | - | |
| 1158 | + | |
1159 | 1159 | | |
1160 | 1160 | | |
1161 | 1161 | | |
| |||
0 commit comments