Re: [BUGS] Bug #718: request for improvement of /? to show /d+ /l+ - Mailing list pgsql-patches
From | Bruce Momjian |
---|---|
Subject | Re: [BUGS] Bug #718: request for improvement of /? to show /d+ /l+ |
Date | |
Msg-id | 200212102125.gBALPG807380@candle.pha.pa.us Whole thread Raw |
Responses |
Re: [BUGS] Bug #718: request for improvement of /? to show /d+ /l+
|
List | pgsql-patches |
Here is a new psql \? output format that I would like to add for 7.4. It follows Harald Armin's suggested reformatting, which you can see below. Should I also reorder the psql manual page to match? I find the grouping much easier to review. --------------------------------------------------------------------------- General \c[onnect] [DBNAME|- [USER]] connect to new database (currently "test") \q quit psql \h [NAME] help on syntax of SQL commands, * for all commands \copyright show PostgreSQL usage and distribution terms \cd [DIR] change the current working directory \! [COMMAND] execute command in shell or start interactive shell \encoding [ENCODING] show or set client encoding \set [NAME [VALUE]] set internal variable, or list all if no parameters \unset NAME unset (delete) internal variable \timing toggle timing of commands (currently off) Query Buffer \g [FILE] send query buffer to server (and results to file or |pipe) \r reset (clear) the query buffer \e [FILE] edit the query buffer (or file) with external editor \i FILE execute commands from file \p show the contents of the query buffer \w [FILE] write query buffer to file \o FILE send all query results to file or |pipe \s [FILE] display history or save it to file Informational \d [NAME] describe table, index, sequence, or view \d{t|i|s|v|S} [PATTERN] (add "+" for more detail) list tables/indexes/sequences/views/system tables \da [PATTERN] list aggregate functions \dd [PATTERN] show comment for object \dD [PATTERN] list domains \df [PATTERN] list functions (add "+" for more detail) \do [NAME] list operators \dl list large objects, same as \lo_list \dp [PATTERN] list table access privileges \dT [PATTERN] list data types (add "+" for more detail) \du [PATTERN] list users \l list all databases (add "+" for more detail) \z [PATTERN] list table access privileges (same as \dp) Large Object, Copy \lo_export \lo_import \lo_list \lo_unlink large object operations \copy ... perform SQL COPY with data stream to the client host Formatting \x toggle expanded output (currently off) \a toggle between unaligned and aligned output mode \f [STRING] show or set field separator for unaligned query output \t show only rows (currently off) \echo [STRING] write string to standard output \qecho [STRING] write string to query output stream (see \o) HTML Output \H toggle HTML output mode (currently off) \C [STRING] set table title, or unset if none \T [STRING] set HTML <table> tag attributes, or unset if none \pset NAME [VALUE] set table output option (NAME := {format|border|expanded|fieldsep|null|recordsep| tuples_only|title|tableattr|pager}) --------------------------------------------------------------------------- Harald Armin Massa wrote: > > Sounds like a great idea --- a longer help version for psql. Yes, > > please give it a try. > > Bruce, > > during ordering I found another "immediate" solution: > > in the Output > > \d TABLE describe table (or view, index, sequence) > > just add > > \d TABLE describe table (or view, index, sequence) add '+' for > extended > > > 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, Pennsylvania 19073
pgsql-patches by date: