On 4 Oct 2001, Arcady Genkin wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > > g9genarc(at)eddie:~$ psql -h /var/pgsql --help
> > > psql was compiled without support for long options.
> > > Use --help for help on invocation options.
> > >
> > > I guess that it was confused by having both options at once, since
> > > "psql --help" works fine (i.e. the long options *do* work).
> > While this message is confusing, it's factually correct. ;-)
> Yes, confusing it is.
> > So --help was the next best (or even better IMHO) choice, and to support
> > it on all installations we had to give it some special treatment.
> That's fine, but IMO "psql -h /var/pgsql --help" and "psql --help"
> should either both work, or both not work. Of course, this is not a
> huge issue, but it did make me rub my eyes (to make sure I wasn't
> seeing a ghost) the first time I've encountered it. :)
On a related matter, psql --help doesn't display the long forms even though they're evidently enabled:
[pgtest(at)numbat pgtest]$ psql --help
This is psql, the PostgreSQL interactive terminal.
psql [options] [dbname [username]]
-a Echo all input from script
-A Unaligned table output mode (-P format=unaligned)
-c COMMAND Run only single command (SQL or internal) and exit
-d DBNAME Specify database name to connect to (default: pgtest)
-e Echo commands sent to server
-E Display queries that internal commands generate
-f FILENAME Execute commands from file, then exit
-F STRING Set field separator (default: "|") (-P fieldsep=)
-h HOSTNAME Specify database server host (default: local socket)
-H HTML table output mode (-P format=html)
-l List available databases, then exit
-n Disable enhanced command line editing (readline)
-o FILENAME Send query results to file (or |pipe)
-p PORT Specify database server port (default: 5433)
-P VAR[=ARG] Set printing option 'VAR' to 'ARG' (see \pset command)
-q Run quietly (no messages, only query output)
-R STRING Set record separator (default: newline) (-P recordsep=)
-s Single step mode (confirm each query)
-S Single line mode (end of line terminates SQL command)
-t Print rows only (-P tuples_only)
-T TEXT Set HTML table tag attributes (width, border) (-P tableattr=)
-U NAME Specify database user name (default: pgtest)
-v NAME=VALUE Set psql variable 'NAME' to 'VALUE'
-V Show version information and exit
-W Prompt for password (should happen automatically)
-x Turn on expanded table output (-P expanded)
-X Do not read startup file (~/.psqlrc)
For more information, type "\?" (for internal commands) or "\help"
(for SQL commands) from within psql, or consult the psql section in
the PostgreSQL documentation.
Report bugs to <pgsql-bugs(at)postgresql(dot)org>.
[pgtest(at)numbat pgtest]$ psql --host
psql: option `--host' requires an argument
Try 'psql --help' for more information.
[pgtest(at)numbat pgtest]$ psql --version
psql (PostgreSQL) 7.2devel
contains support for: readline, history
Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
Portions Copyright (c) 1996, Regents of the University of California
Read the file COPYRIGHT or use the command \copyright to see the
usage and distribution terms.
In response to
pgsql-bugs by date
|Next:||From: Siim Valgeväli||Date: 2001-10-06 07:48:08|
|Subject: Small bug report ...|
|Previous:||From: Andreas Wernitznig||Date: 2001-10-05 22:37:10|
|Subject: Re: Bug #474: Index using problem|