Re: improve the help message about psql -F

Lists: pgsql-hackers
From: Jov <amutu(at)amutu(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: improve the help message about psql -F
Date: 2014-01-17 09:12:06
Message-ID: CADyrUxPEPqc77O6WDz23pNF2HYLbioe9HtTHxLnmtuvY-ijqpQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

in the offical doc,-F say:

> Use separator as the field separator for unaligned output.

but in the psql --help,-F say:

> set field separator (default: "|")

if user don't read the offical doc carefully,he can use:

psql -F , -c 'select ...'

But can't get what he want.
It is a bad user Experience.

I make a patch change the help message for -F to:

> set field separator for unaligned output (default: "|")

patch for head attached.

Jov
blog: http:amutu.com/blog <http://amutu.com/blog>

Attachment Content-Type Size
filed_separator_set_help_imporove.patch.gz application/x-gzip 361 bytes

From: Jov <amutu(at)amutu(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: improve the help message about psql -F
Date: 2014-01-19 05:00:13
Message-ID: CADyrUxNAjo2xrohHdRV7NC=yyWbyGThgo_J9gGyg8e9V4YDQVg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

any commnet?

Jov
blog: http:amutu.com/blog <http://amutu.com/blog>

2014/1/17 Jov <amutu(at)amutu(dot)com>

> in the offical doc,-F say:
>
>> Use separator as the field separator for unaligned output.
>
>
> but in the psql --help,-F say:
>
>> set field separator (default: "|")
>
>
> if user don't read the offical doc carefully,he can use:
>
> psql -F , -c 'select ...'
>
> But can't get what he want.
> It is a bad user Experience.
>
> I make a patch change the help message for -F to:
>
>> set field separator for unaligned output (default: "|")
>
>
> patch for head attached.
>
> Jov
> blog: http:amutu.com/blog <http://amutu.com/blog>
>


From: Marti Raudsepp <marti(at)juffo(dot)org>
To: Jov <amutu(at)amutu(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: improve the help message about psql -F
Date: 2014-01-19 19:24:35
Message-ID: CABRT9RAQcjHBTd3j17S+b_45Jyc01K9Lnwn7CappPAZnmQWJEQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

2014/1/17 Jov <amutu(at)amutu(dot)com>
> but in the psql --help,-F say:
>
>> set field separator (default: "|")

> if user don't read the offical doc carefully,he can use:
>
>> psql -F , -c 'select ...'
>
> But can't get what he want.
> It is a bad user Experience.

+1 from me, patch applies and is helpful.

After patching this line in psql --help is 82 characters long; I think
it's best to keep help screens below 80 characters wide (although
there's already 1 other line violating this rule).

I think the word "set" is pretty useless there anyway, maybe remove
that so the message becomes "field separator for unaligned output
(default: "|")"

PS: There isn't an open CommitFest to add this to. Shouldn't we always
open a new CF when the last one goes in progress? If there's no date,
it may be simply called "next"

Regards,
Marti


From: Jov <amutu(at)amutu(dot)com>
To: Marti Raudsepp <marti(at)juffo(dot)org>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: improve the help message about psql -F
Date: 2014-01-20 12:04:11
Message-ID: CADyrUxPZXvxK=0om543Rho0FBb7txVLct9ZOz-v4EXE1XZviiA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

reasonable,I removed the "set",patch attached.

Jov
blog: http:amutu.com/blog <http://amutu.com/blog>

2014/1/20 Marti Raudsepp <marti(at)juffo(dot)org>

> 2014/1/17 Jov <amutu(at)amutu(dot)com>
> > but in the psql --help,-F say:
> >
> >> set field separator (default: "|")
>
> > if user don't read the offical doc carefully,he can use:
> >
> >> psql -F , -c 'select ...'
> >
> > But can't get what he want.
> > It is a bad user Experience.
>
> +1 from me, patch applies and is helpful.
>
> After patching this line in psql --help is 82 characters long; I think
> it's best to keep help screens below 80 characters wide (although
> there's already 1 other line violating this rule).
>
> I think the word "set" is pretty useless there anyway, maybe remove
> that so the message becomes "field separator for unaligned output
> (default: "|")"
>
> PS: There isn't an open CommitFest to add this to. Shouldn't we always
> open a new CF when the last one goes in progress? If there's no date,
> it may be simply called "next"
>
> Regards,
> Marti
>
>

Attachment Content-Type Size
field_separator_set_help_improve-v2.patch.gz application/x-gzip 365 bytes

From: Marti Raudsepp <marti(at)juffo(dot)org>
To: Jov <amutu(at)amutu(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: improve the help message about psql -F
Date: 2014-01-21 15:27:21
Message-ID: CABRT9RB3KeZn=dzhNFuyAqDSfQAYe7pa6O_oenaFJyJ_OnqJjw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, Jan 20, 2014 at 2:04 PM, Jov <amutu(at)amutu(dot)com> wrote:
> reasonable,I removed the "set",patch attached.

Hi Jov,

A new commitfest was just opened, due on 2014-06. Please add your patch here:
https://commitfest.postgresql.org/action/commitfest_view?id=22

(You'll need a community account if you don't already have one)

Sometimes simple fixes like yours are merged outside a CommitFest, but
adding it there makes sure it won't get lost.

Regards,
Marti


From: Jov <amutu(at)amutu(dot)com>
To: Marti Raudsepp <marti(at)juffo(dot)org>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: improve the help message about psql -F
Date: 2014-01-22 13:06:32
Message-ID: CADyrUxN+M-F4_XrBXc6pQ4sJm2+QY6a+zSKF9_gqKQr6BXmwvg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

OK,I will do it.Thanks.

Jov
blog: http:amutu.com/blog <http://amutu.com/blog>

2014/1/21 Marti Raudsepp <marti(at)juffo(dot)org>

> On Mon, Jan 20, 2014 at 2:04 PM, Jov <amutu(at)amutu(dot)com> wrote:
> > reasonable,I removed the "set",patch attached.
>
> Hi Jov,
>
> A new commitfest was just opened, due on 2014-06. Please add your patch
> here:
> https://commitfest.postgresql.org/action/commitfest_view?id=22
>
> (You'll need a community account if you don't already have one)
>
> Sometimes simple fixes like yours are merged outside a CommitFest, but
> adding it there makes sure it won't get lost.
>
> Regards,
> Marti
>
>


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Jov <amutu(at)amutu(dot)com>
Cc: Marti Raudsepp <marti(at)juffo(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: improve the help message about psql -F
Date: 2014-02-12 03:02:20
Message-ID: 1392174140.30895.2.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

If you are going to change the help string for -F, you should also
update the help string for -R, and possibly for -z and -0.

>
>


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Jov <amutu(at)amutu(dot)com>, Marti Raudsepp <marti(at)juffo(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: improve the help message about psql -F
Date: 2014-04-16 22:15:13
Message-ID: 20140416221513.GJ7443@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Feb 11, 2014 at 10:02:20PM -0500, Peter Eisentraut wrote:
> If you are going to change the help string for -F, you should also
> update the help string for -R, and possibly for -z and -0.

Patch applied with all the suggestions merged in; commitfest item
marked as committed:

-F, --field-separator=STRING
field separator for unaligned output (default: "|")
-H, --html HTML table output mode
-P, --pset=VAR[=ARG] set printing option VAR to ARG (see \pset command)
-R, --record-separator=STRING
record separator for unaligned output (default: newline)
-t, --tuples-only print rows only
-T, --table-attr=TEXT set HTML table tag attributes (e.g., width, border)
-x, --expanded turn on expanded table output
-z, --field-separator-zero
set field separator for unaligned output to zero byte
-0, --record-separator-zero
set record separator for unaligned output to zero byte

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

+ Everyone has their own god. +