postgresql/src/fe_utils
Michael Paquier 07a6c262be 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
2026-06-08 14:37:56 +09:00
..
.gitignore Move psql's psqlscan.l into src/fe_utils. 2016-03-24 20:28:47 -04:00
archive.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
astreamer_file.c Prevent path traversal in pg_basebackup and pg_rewind 2026-05-11 05:13:48 -07:00
astreamer_gzip.c Fix multiple bugs in astreamer pipeline code. 2026-03-29 09:02:15 -04:00
astreamer_lz4.c Fix finalization of decompressor astreamers. 2026-03-22 18:06:48 -04:00
astreamer_tar.c Prevent path traversal in pg_basebackup and pg_rewind 2026-05-11 05:13:48 -07:00
astreamer_zstd.c Fix finalization of decompressor astreamers. 2026-03-22 18:06:48 -04:00
cancel.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
conditional.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
connect_utils.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
Makefile Drop warning-free support for Flex 2.5.35 2025-01-15 15:35:08 +01:00
mbprint.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
meson.build Drop warning-free support for Flex 2.5.35 2025-01-15 15:35:08 +01:00
option_utils.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
parallel_slot.c Fix grammatical typos around possessive "its" 2025-01-29 14:39:14 +07:00
print.c psql: Fix expanded aligned output 2026-06-08 14:37:56 +09:00
psqlscan.l Fix accidentally-harmless thinko in psqlscan_test_variable(). 2025-03-31 12:16:32 -04:00
query_utils.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
recovery_gen.c pg_rewind: Add dbname to primary_conninfo when using --write-recovery-conf. 2025-03-12 16:56:04 -07:00
simple_list.c pg_restore cleanups 2025-04-16 12:04:34 -04:00
string_utils.c In fmtIdEnc(), handle failure of enlargePQExpBuffer(). 2025-02-16 12:46:35 -05:00