Slight help bug with su'ing - Mailing list pgsql-bugs

From Neil Prockter
Subject Slight help bug with su'ing
Date
Msg-id 20010305.11205800@neil.blpes.lse.ac.uk
Whole thread Raw
List pgsql-bugs
Hello

This maybe a little pedantic but...

There is a slight bug in that when a user su's (with 'su' not 'su -' that
works fine) to another user the default database name changes to that
user but the one given under 'pgsql --help' does not

for example

neil-neil [~]> su
Password:
[neil@neil neil]# psql
psql: FATAL 1:  Database "root" does not exist in the system catalog.
[neil@neil neil]# psql --help
This is psql, the PostgreSQL interactive terminal.

Usage:
  psql [options] [dbname [username]]

Options:
  -a              Echo all input from script
  -A              Unaligned table output mode (-P format=unaligned)
  -c <query>      Run only single query (or slash command) and exit
  -d <dbname>     Specify database name to connect to (default: neil)
  -e              Echo queries sent to backend
  -E              Display queries that internal commands generate
  -f <filename>   Execute queries from file, then exit
  -F <string>     Set field separator (default: "|") (-P fieldsep=)
  -h <host>       Specify database server host (default: domain socket)
  -H              HTML table output mode (-P format=html)
  -l              List available databases, then exit
  -n              Disable readline
  -o <filename>   Send query output to filename (or |pipe)
  -p <port>       Specify database server port (default: hardwired)
  -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 (newline terminates query)
  -t              Print rows only (-P tuples_only)
  -T text         Set HTML table tag options (width, border) (-P
tableattr=)
  -U <username>   Specify database username (default: neil)
  -v name=val     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 manual, which accompanies the distribution and is also
available at <http://www.postgresql.org>.
Report bugs to <pgsql-bugs@postgresql.org>.



Cheers,

Neil Prockter

pgsql-bugs by date:

Previous
From: Marcin Wolinski
Date:
Subject: 7.0.x not using indices
Next
From: Tom Lane
Date:
Subject: Re: 7.0.x not using indices