improve the help message about psql -F

Started by Jovalmost 12 years ago8 messages
#1Jov
amutu@amutu.com
1 attachment(s)

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&gt;

Attachments:

filed_separator_set_help_imporove.patch.gzapplication/x-gzip; name=filed_separator_set_help_imporove.patch.gzDownload
#2Jov
amutu@amutu.com
In reply to: Jov (#1)
Re: improve the help message about psql -F

any commnet?

Jov
blog: http:amutu.com/blog <http://amutu.com/blog&gt;

2014/1/17 Jov <amutu@amutu.com>

Show quoted text

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&gt;

#3Marti Raudsepp
marti@juffo.org
In reply to: Jov (#1)
Re: improve the help message about psql -F

2014/1/17 Jov <amutu@amutu.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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4Jov
amutu@amutu.com
In reply to: Marti Raudsepp (#3)
1 attachment(s)
Re: improve the help message about psql -F

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

Jov
blog: http:amutu.com/blog <http://amutu.com/blog&gt;

2014/1/20 Marti Raudsepp <marti@juffo.org>

Show quoted text

2014/1/17 Jov <amutu@amutu.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

Attachments:

field_separator_set_help_improve-v2.patch.gzapplication/x-gzip; name=field_separator_set_help_improve-v2.patch.gzDownload
#5Marti Raudsepp
marti@juffo.org
In reply to: Jov (#4)
Re: improve the help message about psql -F

On Mon, Jan 20, 2014 at 2:04 PM, Jov <amutu@amutu.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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#6Jov
amutu@amutu.com
In reply to: Marti Raudsepp (#5)
Re: improve the help message about psql -F

OK,I will do it.Thanks.

Jov
blog: http:amutu.com/blog <http://amutu.com/blog&gt;

2014/1/21 Marti Raudsepp <marti@juffo.org>

Show quoted text

On Mon, Jan 20, 2014 at 2:04 PM, Jov <amutu@amutu.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

#7Peter Eisentraut
peter_e@gmx.net
In reply to: Jov (#6)
Re: improve the help message about psql -F

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.

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#8Bruce Momjian
bruce@momjian.us
In reply to: Peter Eisentraut (#7)
Re: improve the help message about psql -F

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@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers