forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7d91b60
committed
Fix handling of "Subplans Removed" field in EXPLAIN output.
Commit499be01 added this field in a rather poorly-thought-throughmanner, with the result being that rather than being a field of theAppend or MergeAppend plan node as intended (and as it seems to be,in text format), it was actually an element of the "Plans" subgroup.At least in JSON format, that's flat out invalid syntax, because"Plans" is an array not an object.While it's not hard to move the generation of the field so that itappears where it's supposed to, this does result in a visible changein field order in text format, in cases where a Append or MergeAppendplan node has any InitPlans attached. That's slightly annoying todo in stable branches; but the alternative of continuing to emitbroken non-text formats seems worse.Also, since the set of fields emitted is not supposed to bedata-dependent in non-text formats, make sure that "Subplans Removed"appears in Append and MergeAppend nodes even when it's zero, in thoseformats. (The previous coding made it look like it could appear insome other node types such as BitmapAnd, but we don't actually supportruntime pruning there, so don't emit it in those cases.)Per bug #16171 from Mahadevan Ramachandran. Fix by Daniel Gustafssonand Tom Lane, reviewed by Hamid Akhtar. Back-patch to v11 where thiscode came in.Discussion:https://postgr.es/m/16171-b72259ab75505fa2@postgresql.org1 parent177be9e commit7d91b60
File tree
2 files changed
+50
-29
lines changed- src
- backend/commands
- test/regress/expected
2 files changed
+50
-29
lines changedLines changed: 44 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
119 | 119 |
| |
120 | 120 |
| |
121 | 121 |
| |
122 |
| - | |
123 |
| - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
124 | 125 |
| |
125 | 126 |
| |
126 | 127 |
| |
| |||
1967 | 1968 |
| |
1968 | 1969 |
| |
1969 | 1970 |
| |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
1970 | 1995 |
| |
1971 | 1996 |
| |
1972 | 1997 |
| |
| |||
2007 | 2032 |
| |
2008 | 2033 |
| |
2009 | 2034 |
| |
2010 |
| - | |
2011 | 2035 |
| |
2012 | 2036 |
| |
2013 | 2037 |
| |
2014 | 2038 |
| |
2015 | 2039 |
| |
2016 |
| - | |
2017 | 2040 |
| |
2018 | 2041 |
| |
2019 | 2042 |
| |
2020 | 2043 |
| |
2021 | 2044 |
| |
2022 |
| - | |
2023 | 2045 |
| |
2024 | 2046 |
| |
2025 | 2047 |
| |
2026 | 2048 |
| |
2027 | 2049 |
| |
2028 |
| - | |
2029 | 2050 |
| |
2030 | 2051 |
| |
2031 | 2052 |
| |
2032 | 2053 |
| |
2033 | 2054 |
| |
2034 |
| - | |
2035 | 2055 |
| |
2036 | 2056 |
| |
2037 | 2057 |
| |
| |||
3348 | 3368 |
| |
3349 | 3369 |
| |
3350 | 3370 |
| |
3351 |
| - | |
3352 |
| - | |
3353 |
| - | |
3354 |
| - | |
3355 | 3371 |
| |
3356 | 3372 |
| |
3357 |
| - | |
| 3373 | + | |
3358 | 3374 |
| |
3359 | 3375 |
| |
3360 | 3376 |
| |
3361 | 3377 |
| |
3362 |
| - | |
3363 |
| - | |
3364 |
| - | |
3365 |
| - | |
3366 |
| - | |
3367 |
| - | |
3368 |
| - | |
3369 |
| - | |
3370 |
| - | |
3371 |
| - | |
3372 |
| - | |
| 3378 | + | |
3373 | 3379 |
| |
3374 | 3380 |
| |
3375 | 3381 |
| |
3376 | 3382 |
| |
| 3383 | + | |
| 3384 | + | |
| 3385 | + | |
| 3386 | + | |
| 3387 | + | |
| 3388 | + | |
| 3389 | + | |
| 3390 | + | |
| 3391 | + | |
| 3392 | + | |
| 3393 | + | |
| 3394 | + | |
| 3395 | + | |
| 3396 | + | |
| 3397 | + | |
3377 | 3398 |
| |
3378 | 3399 |
| |
3379 | 3400 |
| |
|
Lines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1808 | 1808 |
| |
1809 | 1809 |
| |
1810 | 1810 |
| |
| 1811 | + | |
1811 | 1812 |
| |
1812 | 1813 |
| |
1813 |
| - | |
1814 | 1814 |
| |
1815 | 1815 |
| |
1816 | 1816 |
| |
| |||
1826 | 1826 |
| |
1827 | 1827 |
| |
1828 | 1828 |
| |
| 1829 | + | |
1829 | 1830 |
| |
1830 | 1831 |
| |
1831 |
| - | |
1832 | 1832 |
| |
1833 | 1833 |
| |
1834 | 1834 |
| |
| |||
2396 | 2396 |
| |
2397 | 2397 |
| |
2398 | 2398 |
| |
| 2399 | + | |
2399 | 2400 |
| |
2400 | 2401 |
| |
2401 |
| - | |
2402 | 2402 |
| |
2403 | 2403 |
| |
2404 | 2404 |
| |
| |||
3032 | 3032 |
| |
3033 | 3033 |
| |
3034 | 3034 |
| |
| 3035 | + | |
3035 | 3036 |
| |
3036 | 3037 |
| |
3037 |
| - | |
3038 | 3038 |
| |
3039 | 3039 |
| |
3040 | 3040 |
| |
| |||
3047 | 3047 |
| |
3048 | 3048 |
| |
3049 | 3049 |
| |
| 3050 | + | |
3050 | 3051 |
| |
3051 | 3052 |
| |
3052 |
| - | |
3053 | 3053 |
| |
3054 | 3054 |
| |
3055 | 3055 |
| |
| |||
3594 | 3594 |
| |
3595 | 3595 |
| |
3596 | 3596 |
| |
| 3597 | + | |
3597 | 3598 |
| |
3598 | 3599 |
| |
3599 |
| - | |
3600 | 3600 |
| |
3601 | 3601 |
| |
3602 | 3602 |
| |
|
0 commit comments
Comments
(0)