cosmetic psql tweaks
As the subject says -- I've applied this patch to HEAD.
-Neil
Attachments:
psql-print-query-cosmetic-1.patchtext/plain; name=psql-print-query-cosmetic-1.patch; x-mac-creator=0; x-mac-type=0Download+21-19
Neil Conway <neilc@samurai.com> writes:
printTable(opt->title, headers, cells,
! footers ? (const char *const *) footers : (const char *const *) (opt->footers),
align, &opt->topt, fout);
printTable(opt->title, headers, cells,
! (const char *const *) footers,
align, &opt->topt, fout);
Er, doesn't that change the behavior?
regards, tom lane
Tom Lane wrote:
Er, doesn't that change the behavior?
I don't believe so. There is an if statement earlier that assigns
opt->footers to footers is the former is non-NULL. In other words:
if (opt->footers)
footers = opt->footers;
else if (...)
footers = xyz();
else
footers = NULL;
Therefore if footers is NULL then opt->footers must also be NULL, so the
previous trinary statement is just confusing.
-Neil