pgsql: psql: Fix expanded aligned output - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: psql: Fix expanded aligned output
Date
Msg-id E1wWSiz-001YEQ-0J@gemulon.postgresql.org
Whole thread
List pgsql-committers
psql: Fix expanded aligned output

When a table's columns are narrower than the record header line, the
expanded aligned format produced misaligned output because the data
column width was not adjusted to match the record header width, leading
to output like:
+-[ RECORD 1 ]-+
| a | 10 |
| b | 20 |
+---+----+

This commit adjusts the output so as the column width match with the
header line, giving:
+-[ RECORD 1 ]-+
| a | 10       |
| b | 20       |
+---+----------+

Author: Pavel Stehule <pavel.stehule@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/CAFj8pRCzGpsr9zTHbtTd4mGh2YPJqOEgLgt8JLiopuYA9_1xGw@mail.gmail.com
Backpatch-through: 14

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/efd885d05b8beded386fbb5a9d737dc9e65289a9

Modified Files
--------------
src/fe_utils/print.c               |  7 ++++---
src/test/regress/expected/psql.out | 26 ++++++++++++++++++++++++++
src/test/regress/sql/psql.sql      | 11 +++++++++++
3 files changed, 41 insertions(+), 3 deletions(-)


pgsql-committers by date:

Previous
From: Amit Kapila
Date:
Subject: pgsql: Fix publisher retain_dead_tuples check when also changing origin
Next
From: Amit Kapila
Date:
Subject: pgsql: Doc: Add missing SGML markup in alter_publication.sgml.