Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2287b87

Browse files
committed
Further adjustment to psql's print_aligned_vertical() function.
We should ignore output_columns unless it's greater than zero.A zero means we couldn't get any information from ioctl(TIOCGWINSZ);in that case the expected behavior is to print the data at native width,not to wrap it at the smallest possible value. print_aligned_text()gets this consideration right, but print_aligned_vertical() lost trackof this detail somewhere along the line.
1 parente50cda7 commit2287b87

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/bin/psql/print.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,8 @@ print_aligned_vertical(const printTableContent *cont, FILE *fout)
14241424
if (rwidth>min_width)
14251425
min_width=rwidth;
14261426

1427-
if (width<min_width||output_columns<min_width)
1427+
if (width<min_width||
1428+
(output_columns>0&&output_columns<min_width))
14281429
{
14291430
/* Set data width to match min_width */
14301431
newdwidth=min_width-hwidth-swidth;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp