pgsql: Handle border = 3 in expanded mode

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Handle border = 3 in expanded mode
Date: 2014-09-12 15:24:48
Message-ID: E1XSSiO-0002Ys-8K@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Handle border = 3 in expanded mode

In psql, expanded mode was not being displayed correctly when using
the normal ascii or unicode linestyles and border set to '3'. Now,
per the documentation, border '3' is really only sensible for HTML
and LaTeX formats, however, that's no excuse for ascii/unicode to
break in that case, and provisions had been made for psql to cleanly
handle this case (and it did, in non-expanded mode).

This was broken when ascii/unicode was initially added a good five
years ago because print_aligned_vertical_line wasn't passed in the
border setting being used by print_aligned_vertical but instead was
given the whole printTableContent. There really isn't a good reason
for vertical_line to have the entire printTableContent structure, so
just pass in the printTextFormat and border setting (similar to how
this is handled in horizontal_line).

Pointed out by Pavel Stehule, fix by me.

Back-patch to all currently-supported versions.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/7ec3990944b9db39c2a1f44bf4e7929ee74c6491

Modified Files
--------------
src/bin/psql/print.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2014-09-12 16:08:28 pgsql: Add unicode_{column|header|border}_style to psql
Previous Message Fujii Masao 2014-09-12 14:40:37 pgsql: Support ALTER SYSTEM RESET command.