[PATCH 8/9] psql: print_aligned_vertical_line: Correct alignment - Mailing list pgsql-hackers

From Roger Leigh
Subject [PATCH 8/9] psql: print_aligned_vertical_line: Correct alignment
Date
Msg-id 1250964814-22262-2-git-send-email-rleigh@debian.org
Whole thread Raw
In response to Unicode UTF-8 table formatting for psql text output  (Roger Leigh <rleigh@debian.org>)
List pgsql-hackers
Correct a corner case where the middle column separator overlaps
the right edge of the record number.

Signed-off-by: Roger Leigh <rleigh@debian.org>
---src/bin/psql/print.c |    8 ++++----1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bin/psql/print.c b/src/bin/psql/print.c
index be81adc..c6394ad 100644
--- a/src/bin/psql/print.c
+++ b/src/bin/psql/print.c
@@ -1034,16 +1034,16 @@ print_aligned_vertical_line(const printTableContent *cont,    if (opt_border > 0)    {
-        if (--reclen <= 0)
+        if (reclen-- <= 0)            fputs(format->hrule, fout);
-        if (--reclen <= 0)
+        if (reclen-- <= 0)            fputs(lformat->midvrule, fout);
-        if (--reclen <= 0)
+        if (reclen-- <= 0)            fputs(format->hrule, fout);    }    else    {
-        if (reclen-- > 0)
+        if (reclen-- <= 0)            fputs(" ", fout);    }    if (reclen < 0)
-- 
1.6.3.3



pgsql-hackers by date:

Previous
From: Roger Leigh
Date:
Subject: [PATCH 2/6] psql: Add table formats for ASCII and UTF-8
Next
From: Roger Leigh
Date:
Subject: Unicode UTF-8 table formatting for psql text output