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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-bugs by date

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