Re: Terminal width for help output

Lists: pgsql-hackers
From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Terminal width for help output
Date: 2007-11-15 20:58:28
Message-ID: 200711152158.29284.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Do we care to maintain a maximum width for programs' --help output (and psql's
\?)? I think 79 characters was once a recommendation (or perhaps 72), but we
have a couple of violations either way, which I'd like to fix, but what to?

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Terminal width for help output
Date: 2007-11-15 21:02:16
Message-ID: 200711152102.lAFL2G604450@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Peter Eisentraut wrote:
> Do we care to maintain a maximum width for programs' --help output (and psql's
> \?)? I think 79 characters was once a recommendation (or perhaps 72), but we
> have a couple of violations either way, which I'd like to fix, but what to?

Yea, I went over with the pg_ctl --timeout parameter and had to trim a
little. I would like us to keep it <80 myself.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Terminal width for help output
Date: 2007-11-15 21:02:32
Message-ID: 20071115130232.2fa951cb@scratch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 15 Nov 2007 21:58:28 +0100
Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:

> Do we care to maintain a maximum width for programs' --help output
> (and psql's \?)? I think 79 characters was once a recommendation (or
> perhaps 72), but we have a couple of violations either way, which I'd
> like to fix, but what to?

Why not just have the terminal control the wrap? It isn't just \? that
does it.

Sincerely,

Joshua D. Drake

- --

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240
PostgreSQL solutions since 1997 http://www.commandprompt.com/
UNIQUE NOT NULL
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHPLPqATb/zqfZUUQRAuu9AKCIBLRm0ehiWWW7RYi9zjles97/nACcCQu3
5aIzQRH0navadQQzCE6Xn64=
=tTOa
-----END PGP SIGNATURE-----


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Terminal width for help output
Date: 2007-11-15 21:04:46
Message-ID: 23741.1195160686@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Do we care to maintain a maximum width for programs' --help output (and psql's
> \?)? I think 79 characters was once a recommendation (or perhaps 72), but we
> have a couple of violations either way, which I'd like to fix, but what to?

I think 79 is still a reasonable maximum. AFAIK 80 columns is still a
pretty standard terminal window width, but if you try to print in the
last column you may get unexpected extra blank lines.

regards, tom lane


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Terminal width for help output
Date: 2007-11-15 21:07:10
Message-ID: 473CB4FE.2040804@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Bruce Momjian wrote:
> Peter Eisentraut wrote:
>
>> Do we care to maintain a maximum width for programs' --help output (and psql's
>> \?)? I think 79 characters was once a recommendation (or perhaps 72), but we
>> have a couple of violations either way, which I'd like to fix, but what to?
>>
>
> Yea, I went over with the pg_ctl --timeout parameter and had to trim a
> little. I would like us to keep it <80 myself.
>
>

+1. wrapping is annoying.

cheers

andrew


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Terminal width for help output
Date: 2007-11-15 21:10:16
Message-ID: 20071115131016.1a4d58ec@scratch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 15 Nov 2007 16:04:46 -0500
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > Do we care to maintain a maximum width for programs' --help output
> > (and psql's \?)? I think 79 characters was once a recommendation
> > (or perhaps 72), but we have a couple of violations either way,
> > which I'd like to fix, but what to?
>
> I think 79 is still a reasonable maximum. AFAIK 80 columns is still a
> pretty standard terminal window width, but if you try to print in the
> last column you may get unexpected extra blank lines.

O.k. this might be offtopic if it is feel free to smack me... but I
have noticed that psql really breaks on terminals that are wide.. \df
works fine, but \df+ is completely broke.

Can't we just ask the terminal?

Sincerely,

Joshua D. Drake

>
> regards, tom lane
>
> ---------------------------(end of
> broadcast)--------------------------- TIP 7: You can help support the
> PostgreSQL project by donating at
>
> http://www.postgresql.org/about/donate
>

- --

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240
PostgreSQL solutions since 1997 http://www.commandprompt.com/
UNIQUE NOT NULL
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHPLW4ATb/zqfZUUQRAtH2AJ0cm3Od8SibuI79osf8wG94pqGGnwCeNVjQ
qe+JxVIPris0akcrlCLeAO4=
=8pTZ
-----END PGP SIGNATURE-----


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Terminal width for help output
Date: 2007-11-15 21:11:46
Message-ID: 200711152111.lAFLBlC06103@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Joshua D. Drake wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Thu, 15 Nov 2007 16:04:46 -0500
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> > Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > > Do we care to maintain a maximum width for programs' --help output
> > > (and psql's \?)? I think 79 characters was once a recommendation
> > > (or perhaps 72), but we have a couple of violations either way,
> > > which I'd like to fix, but what to?
> >
> > I think 79 is still a reasonable maximum. AFAIK 80 columns is still a
> > pretty standard terminal window width, but if you try to print in the
> > last column you may get unexpected extra blank lines.
>
> O.k. this might be offtopic if it is feel free to smack me... but I
> have noticed that psql really breaks on terminals that are wide.. \df
> works fine, but \df+ is completely broke.
>
> Can't we just ask the terminal?

Peter is talking about --help text that is hard-coded into the binary,
meaning you don't run it through some filter before output.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +


From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Terminal width for help output
Date: 2007-11-15 21:56:06
Message-ID: 20071115215606.GE17793@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Peter Eisentraut wrote:
> Do we care to maintain a maximum width for programs' --help output (and psql's
> \?)? I think 79 characters was once a recommendation (or perhaps 72), but we
> have a couple of violations either way, which I'd like to fix, but what to?

79 is perfect IMHO. It would be great to ask translators to preserve
the constraint too.

Also it would rock if translation kept the alignment in various output.
For example, avoid stuff like

$ pg_controldata
Numéro de version de pg_control : 833
Numéro de version du catalogue : 200710232
Identifiant du système de base de données : 5125738698090412341
Etat du groupe de base de données : arrêt
Dernière modification de pg_control : jeu 15 nov 2007 08:17:22 CLST
Dernière localisation du point de contrôle: 0/4D06F8
Précédente localisation du point de contrôle: 0/4B9818
Dernière localisation de reprise du point de contrôle : 0/4D06F8
Dernier TimeLineID du point de vérification : 1
Dernier NextXID du point de contrôle : 0/395
Dernier NextXOID du point de contrôle : 16407
Dernier NextMultiXactId du point de contrôle : 1
Dernier NextMultiOffset du point de contrôle : 0
Heure du dernier point de contrôle : jeu 15 nov 2007 08:17:22 CLST
Emplacement de fin de la récupération minimale: 0/0
Alignement maximale de la donnée : 8
Taille de bloc de la base de données : 8192
Blocs par segment pour une relation importante : 131072
Taille de bloc du WAL : 8192
Octets par segment WAL : 16777216
Taille maximale des identifiants : 64
Nombre de colonnes maximum d'un index: 32
Maximum size of a TOAST chunk: 1996
Stockage du type date/heure : nombres à virgule flottante
Taille maximum d'un nom local : 128
LC_COLLATE : fr_CA.utf-8
LC_CTYPE : fr_CA.utf-8

--
Alvaro Herrera http://www.amazon.com/gp/registry/DXLWNGRJD34J
"Those who use electric razors are infidels destined to burn in hell while
we drink from rivers of beer, download free vids and mingle with naked
well shaved babes." (http://slashdot.org/comments.pl?sid=44793&cid=4647152)


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Terminal width for help output
Date: 2007-11-15 22:09:38
Message-ID: 2368.1195164578@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> Also it would rock if translation kept the alignment in various output.

Theoretically the translators are supposed to do that already ...

regards, tom lane


From: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
To: "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Terminal width for help output
Date: 2007-11-15 22:11:04
Message-ID: 36e682920711151411y3820da2ep9c7f31bbf3d2cad6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Nov 15, 2007 4:56 PM, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> Peter Eisentraut wrote:
> > Do we care to maintain a maximum width for programs' --help output (and psql's
> > \?)? I think 79 characters was once a recommendation (or perhaps 72), but we
> > have a couple of violations either way, which I'd like to fix, but what to?
>
> 79 is perfect IMHO. It would be great to ask translators to preserve
> the constraint too.

Agreed, all my terminals are set to standard 80 cols and I always
manually wrap at 79 just to be safe.

--
Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324
EnterpriseDB Corporation | fax: 732.331.1301
499 Thornall Street, 2nd Floor | jonah(dot)harris(at)enterprisedb(dot)com
Edison, NJ 08837 | http://www.enterprisedb.com/


From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Terminal width for help output
Date: 2007-11-19 21:34:00
Message-ID: 47420148.5060508@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Alvaro Herrera a écrit :
> Peter Eisentraut wrote:
>> Do we care to maintain a maximum width for programs' --help output (and psql's
>> \?)? I think 79 characters was once a recommendation (or perhaps 72), but we
>> have a couple of violations either way, which I'd like to fix, but what to?
>
> 79 is perfect IMHO. It would be great to ask translators to preserve
> the constraint too.
>

I wasn't aware of the constraint. Now, I'll do it. Are there other
constraints that translators should know about ?

> Also it would rock if translation kept the alignment in various output.
> For example, avoid stuff like
>
> $ pg_controldata
> Numéro de version de pg_control : 833
> Numéro de version du catalogue : 200710232
> Identifiant du système de base de données : 5125738698090412341
> Etat du groupe de base de données : arrêt
> Dernière modification de pg_control : jeu 15 nov 2007 08:17:22 CLST
> Dernière localisation du point de contrôle: 0/4D06F8
> Précédente localisation du point de contrôle: 0/4B9818
> Dernière localisation de reprise du point de contrôle : 0/4D06F8
> Dernier TimeLineID du point de vérification : 1
> Dernier NextXID du point de contrôle : 0/395
> Dernier NextXOID du point de contrôle : 16407
> Dernier NextMultiXactId du point de contrôle : 1
> Dernier NextMultiOffset du point de contrôle : 0
> Heure du dernier point de contrôle : jeu 15 nov 2007 08:17:22 CLST
> Emplacement de fin de la récupération minimale: 0/0
> Alignement maximale de la donnée : 8
> Taille de bloc de la base de données : 8192
> Blocs par segment pour une relation importante : 131072
> Taille de bloc du WAL : 8192
> Octets par segment WAL : 16777216
> Taille maximale des identifiants : 64
> Nombre de colonnes maximum d'un index: 32
> Maximum size of a TOAST chunk: 1996
> Stockage du type date/heure : nombres à virgule flottante
> Taille maximum d'un nom local : 128
> LC_COLLATE : fr_CA.utf-8
> LC_CTYPE : fr_CA.utf-8
>

+1

Thanks for the tips.

--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com


From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Terminal width for help output
Date: 2007-11-19 21:39:32
Message-ID: 20071119213932.GP1955@frubble.xen.chris-lamb.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Nov 15, 2007 at 06:56:06PM -0300, Alvaro Herrera wrote:
> Peter Eisentraut wrote:
> > Do we care to maintain a maximum width for programs' --help output (and psql's
> > \?)? I think 79 characters was once a recommendation (or perhaps 72), but we
> > have a couple of violations either way, which I'd like to fix, but what to?
>
> 79 is perfect IMHO. It would be great to ask translators to preserve
> the constraint too.

I thought that <79 was good because if output was copied/pasted into an
email that didn't fold lines nicely then output wouldn't get immediately
mangled.

Sam