Thread: Re: [BUGS] Bug #718: request for improvement of /? to show /d+ /l+

Re: [BUGS] Bug #718: request for improvement of /? to show /d+ /l+

From
Bruce Momjian
Date:
Folks, I discussed with Harald a month ago how to improve the psql \?
display.  I have implemented his idea of mentioning '+' for the options
that can use it, and that is in CVS.

His other idea is to group the backslash commands into sections, so they
are not all one big alphabetical list.

How do people like the idea of grouping them?  I would do it in psql \?
and in the psql manual page.

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

Harald Armin Massa wrote:
> But there could really be an improvement of the psql help by grouping the
> commands after "Areas of interest" instead of sorting on alphabet. I have
> done a first try:
> 
> Servers, Connections
>  \c[onnect] [DBNAME|- [USER]]
>                 connect to new database (currently "test")
>  \h NAME        help on syntax of SQL commands, * for all commands
>  \g FILENAME    send SQL command to server (and write results to file or
> |pipe)
>  \copy ...      perform SQL COPY with data stream to the client host
>  \cd [DIRNAME]  change the current working directory
>  \! [COMMAND]   execute command in shell or start interactive shell
>  \encoding ENCODING  set client encoding
>  \set NAME VALUE  set internal variable
>  \unset NAME    unset (delete) internal variable
>  \q             quit psql
> 
> 
> Information Functions
>  \copyright     show PostgreSQL usage and distribution terms
>  \d TABLE       describe table (or view, index, sequence)
>  \d{t|i|s|v}... list tables/indexes/sequences/views (add + for extended)
>  \d{p|S|l}      list access privileges, system tables, or large objects
>  \da            list aggregate functions
>  \dd NAME       show comment for table, type, function, or operator
>  \df            list functions
>  \do            list operators
>  \dT            list data types
>  \l             list all databases (add + for extended output)
>  \z             list table access privileges
>  \d+            extended List
>  \l+
> 
> Query Buffer
>  \r             reset (clear) the query buffer
>  \e FILENAME    edit the current query buffer or file with external editor
>  \i FILENAME    execute commands from file
>  \p             show the content of the current query buffer
>  \w FILENAME    write current query buffer to file
> 
> 
> Large Object
>  \lo_export, \lo_import, \lo_list, \lo_unlink
>                 large object operations
> 
> Output and Formatting
>  \o FILENAME    send all query results to file or |pipe
>  \a             toggle between unaligned and aligned output mode
>  \f STRING      set field separator
>  \t             show only rows (currently off)
>  \x             toggle expanded output (currently off)
>  \echo TEXT     write text to standard output
>  \qecho TEXT    write text to query output stream (see \o)
>  \s FILENAME    print history or save it to file
>  \C TITLE       set table title
>  \H             toggle HTML output mode (currently off)
>  \T TEXT        set HTML table tag attributes
>  \pset VAR      set table output option (VAR := {format|border|expanded|
>                 fieldsep|null|recordsep|tuples_only|title|tableattr|pager})

--  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,
Pennsylvania19073
 


Re: [BUGS] Bug #718: request for improvement of /? to

From
Alvaro Herrera
Date:
Bruce Momjian dijo: 

> Folks, I discussed with Harald a month ago how to improve the psql \?
> display.  I have implemented his idea of mentioning '+' for the options
> that can use it, and that is in CVS.
> 
> His other idea is to group the backslash commands into sections, so they
> are not all one big alphabetical list.
> 
> How do people like the idea of grouping them?  I would do it in psql \?
> and in the psql manual page.

I think the grouping improves usability in general; however, the list
you propose below is too long.  Maybe having a "table of contents" with
the groups and allow \? to take an argument?

-- 
Alvaro Herrera (<alvherre[a]atentus.com>)
"Aprende a avergonzarte mas ante ti que ante los demas" (Democrito)



Re: [BUGS] Bug #718: request for improvement of /? to show

From
Bruce Momjian
Date:
Alvaro Herrera wrote:
> Bruce Momjian dijo: 
> 
> > Folks, I discussed with Harald a month ago how to improve the psql \?
> > display.  I have implemented his idea of mentioning '+' for the options
> > that can use it, and that is in CVS.
> > 
> > His other idea is to group the backslash commands into sections, so they
> > are not all one big alphabetical list.
> > 
> > How do people like the idea of grouping them?  I would do it in psql \?
> > and in the psql manual page.
> 
> I think the grouping improves usability in general; however, the list
> you propose below is too long.  Maybe having a "table of contents" with
> the groups and allow \? to take an argument?

I will pair down the actual output to look reasonable, and you can
scroll through the \? help anyway, so we should be OK.

--  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,
Pennsylvania19073
 


Re: [BUGS] Bug #718: request for improvement of /? to

From
Peter Eisentraut
Date:
Bruce Momjian writes:

> How do people like the idea of grouping them?  I would do it in psql \?
> and in the psql manual page.

Seems reasonable, but then we should also have something along the lines
of

\? \r

so I don't have to dig through the whole pile if I'm interested in a
particular command.  (cf. \help behavior)

In the man page the change would be OK since you can easily search the
page for any string.

-- 
Peter Eisentraut   peter_e@gmx.net



Re: [BUGS] Bug #718: request for improvement of /? to

From
Alvaro Herrera
Date:
En Fri, 30 Aug 2002 00:14:20 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net> escribió:

> Bruce Momjian writes:
> 
> > How do people like the idea of grouping them?  I would do it in psql \?
> > and in the psql manual page.
> 
> Seems reasonable, but then we should also have something along the lines
> of
> 
> \? \r
> 
> so I don't have to dig through the whole pile if I'm interested in a
> particular command.  (cf. \help behavior)

That'd be neat.  Also you can include some meta-items that allow the
display of a single group with more detail.

-- 
Alvaro Herrera (<alvherre[a]atentus.com>)
"Nunca se desea ardientemente lo que solo se desea por razon" (F. Alexandre)