Re: Properly page footers in psql

Started by Bruce Momjianalmost 24 years ago2 messagespatches
Jump to latest
#1Bruce Momjian
bruce@momjian.us

Nice improvement. Applied.

We do check the length because most pagers require you to quit them, and
if it is only a few lines, it is a pain to exit. Some pagers will only
as for a quite if the contents overflow the page, but not all of them,
and we have no way of knowing if the pager they are using does this.

---------------------------------------------------------------------------

Greg Sabino Mullane wrote:
[ There is text before PGP section. ]

[ PGP not available, raw data follows ]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message

Any word on this? Is there a disadvantage to not guessing
the number of lines and just sending everything to the pager
no matter what?

Index: print.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/print.c,v
retrieving revision 1.28
diff -r1.28 print.c
1078,1079c1078,1080
< if (!opt->tuples_only)
< lines += 5;
---

if (footers && !opt->tuples_only)
for (ptr = footers; *ptr; ptr++)
lines++;

1106d1106

Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200208311637

-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html

iD8DBQE9cSpvvJuQZxSWSsgRAiunAKCN4+YpR5QmMyGIPmlTMAhj2ewSBACg7tvr
n0yEFMfJnXgyVdZkP/DZUH4=
=9zcO
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

[ Decrypting message... End of raw data. ]

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Attachments:

/bjm/difftext/plainDownload+5-5
#2Greg Sabino Mullane
greg@turnstep.com
In reply to: Bruce Momjian (#1)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message

Any word on this? Is there a disadvantage to not guessing
the number of lines and just sending everything to the pager
no matter what?

Index: print.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/print.c,v
retrieving revision 1.28
diff -r1.28 print.c
1078,1079c1078,1080
< if (!opt->tuples_only)
< lines += 5;
---

if (footers && !opt->tuples_only)
for (ptr = footers; *ptr; ptr++)
lines++;

1106d1106

Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200208311637

-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html

iD8DBQE9cSpvvJuQZxSWSsgRAiunAKCN4+YpR5QmMyGIPmlTMAhj2ewSBACg7tvr
n0yEFMfJnXgyVdZkP/DZUH4=
=9zcO
-----END PGP SIGNATURE-----