Re: Avoid unused value (src/fe_utils/print.c)
От | Karina Litskevich |
---|---|
Тема | Re: Avoid unused value (src/fe_utils/print.c) |
Дата | |
Msg-id | CACiT8iZAyf+89p=WgehHr2AeBK58O2=vFf78gDmt9Aa3V=iP0A@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Avoid unused value (src/fe_utils/print.c) (Ranier Vilela <ranier.vf@gmail.com>) |
Ответы |
Re: Avoid unused value (src/fe_utils/print.c)
|
Список | pgsql-hackers |
But
it's not obvious, so I also have doubts about removing this line. If someday
print options are changed, for example to support printing footers and not
printing headers, or anything else changes in this function, the output might
be unexpected with this line removed.That part I didn't understand.
How are we going to make this function less readable by removing the complicating part.
My point is, technically right now you won't see any difference in output
if you remove the line. Because if we get to that line the need_recordsepis already true. However, understanding why it is true is complicated. That's
why if you remove the line people who read the code will wonder why we don't
need a separator after "fputs"ing a footer. So keeping that line will make
the code more readable.
Moreover, removing the line will possibly complicate the future maintenance.
As I wrote in the part you just quoted, if the function changes in the way
output will be unexpected.
В списке pgsql-hackers по дате отправления: