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: 20010305.11205800@neil.blpes.lse.ac.uk (view raw or flat)
Thread:
Lists: 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(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.

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(at)postgresql(dot)org>.



Cheers,

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-2014 The PostgreSQL Global Development Group