Use of pager, help, localization: - Mailing list pgsql-hackers

From Daniele Varrazzo
Subject Use of pager, help, localization:
Date
Msg-id CA+mi_8bR68W9t8mXpAi2NcmviDHPPYz7irokscmsOd3MFv+4YA@mail.gmail.com
Whole thread Raw
Responses Re: Use of pager, help, localization:  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
From psql/help.c

    /*
    * Keep this line count in sync with the number of lines printed below!
    * Use "psql --help=variables | wc" to count correctly; but notice that
    * Windows builds currently print one more line than non-Windows builds.
    * Using the larger number is fine.
    */
    output = PageOutput(156, pager ? &(pset.popt.topt) : NULL);

uhm... this doesn't work at all with i10n, above all if respecting an
80 cols width.

Wouldn't be better to generate the output in a temp buffer after l10n,
count the line, then choose whether to use a pager or not?

Can provide a patch if you deem so.

-- Daniele


pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: pg11rc1 DROP INDEX: NOTICE: drop_trigger
Next
From: Tom Lane
Date:
Subject: Re: pg11rc1 DROP INDEX: NOTICE: drop_trigger