Skip site navigation (1) Skip section navigation (2)

Slight help bug with su'ing

From: Neil Prockter <n(dot)prockter(at)lse(dot)ac(dot)uk>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Slight help bug with su'ing
Date: 2001-03-05 11:20:58
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs

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
[neil(at)neil neil]# psql
psql: FATAL 1:  Database "root" does not exist in the system catalog.
[neil(at)neil neil]# 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 <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 
  -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 <>.
Report bugs to <pgsql-bugs(at)postgresql(dot)org>.


Neil Prockter

pgsql-bugs by date

Next:From: Ivan BaldoDate: 2001-03-05 16:22:53
Subject: 7.0.3 - Backend crash on simple SELECT query
Previous:From: Marcin WolinskiDate: 2001-03-04 16:11:29
Subject: 7.0.x not using indices

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group