Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit dd1dcf2

Browse files
committed
Improve footer length computation for psql.
Greg Sabino Mullan
1 parent 548d646 commit dd1dcf2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/bin/psql/print.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.30 2002/08/28 20:46:24 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.31 2002/09/01 23:30:46 momjian Exp $
77
*/
88
#include "postgres_fe.h"
99
#include "print.h"
@@ -1017,8 +1017,9 @@ printTable(const char *title,
10171017
lines = (col_count + 1) * row_count;
10181018
else
10191019
lines = row_count + 1;
1020-
if (!opt->tuples_only)
1021-
lines += 5;
1020+
if (footers && !opt->tuples_only)
1021+
for (ptr = footers; *ptr; ptr++)
1022+
lines++;
10221023

10231024
result = ioctl(fileno(stdout), TIOCGWINSZ, &screen_size);
10241025
if (result == -1 || lines > screen_size.ws_row)

0 commit comments

Comments
 (0)