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

Commit4077fb4

Browse files
committed
Fix an error in psql that overcounted output lines.
This error counted the first line of a cell as "extra". The effect wasto cause far too frequent invocation of the pager. In most cases thiscan be worked around (for example, by using the "less" pager with the -Fflag), so don't backpatch.
1 parente4d2817 commit4077fb4

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
@@ -836,7 +836,8 @@ print_aligned_text(const printTableContent *cont, FILE *fout)
836836
{
837837
unsignedintextra_lines;
838838

839-
extra_lines= (width-1) /width_wrap[i]+nl_lines;
839+
/* don't count the first line of nl_lines - it's not "extra" */
840+
extra_lines= ((width-1) /width_wrap[i])+nl_lines-1;
840841
if (extra_lines>extra_row_output_lines)
841842
extra_row_output_lines=extra_lines;
842843
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp