Re: Remove redundant if-else in EXPLAIN by using ExplainPropertyText
От | David Rowley |
---|---|
Тема | Re: Remove redundant if-else in EXPLAIN by using ExplainPropertyText |
Дата | |
Msg-id | CAApHDvo+HL+suyFwDc90DOuqr6BsDHN09kbymGPdjshhpK1Vwg@mail.gmail.com обсуждение исходный текст |
Ответ на | Remove redundant if-else in EXPLAIN by using ExplainPropertyText (Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>) |
Ответы |
Re: Remove redundant if-else in EXPLAIN by using ExplainPropertyText
|
Список | pgsql-hackers |
On Fri, 21 Mar 2025 at 09:24, Ilia Evdokimov <ilya.evdokimov@tantorlabs.com> wrote: > Thanks to David [0], we found that the if and else branches contained > equivalent code. Since ExplainPropertyText already handles non-text > formats, the extra condition is unnecessary. > > I reviewed other files related to EXPLAIN where similar patterns might > exist, but this was the only instance I found. I looked at; git grep -E "appendStringInfo.*\\n" -- src/backend/commands/explain.c and all those results are appending multiple options. No single option ones. The patch looks good to me and seems worth applying to master. I feel this should be fixed to avoid misleading future patches that add new properties to Memoize into copying the same pattern. David
В списке pgsql-hackers по дате отправления: