-
Makes psql prompt for the user name and
+
Forces psql to prompt for the user name and
password before connecting to the database.
- Cause
psql to prompt for a
- password before connecting to a database. This will remain set for
- the entire session, even if you change the database connection
- with the meta-command \connect.
+ Forces
psql to prompt for a
+ password before connecting to a database.
- In the current version,
psql
- automatically issues a password prompt whenever the server
- requests password authentication. Because this is currently based
- on a hack, the automatic recognition might mysteriously fail,
- hence this option to force a prompt. If no password prompt is
- issued and the server requires password authentication, the
- connection attempt will fail.
+
psql should automatically prompt for a
+ password whenever the server requests password authentication.
+ However, currently password request detection is not totally
+ reliable, hence this option to force a prompt. If no password
+ prompt is issued and the server requires password authentication,
+ the connection attempt will fail.
+
+ This option will remain set for the entire session, even if you
+ change the database connection with the meta-command
+ \connect.
+
+
some typing by setting the environment variables
PGDATABASE, PGHOST,
PGPORT and/or PGUSER to appropriate
- values.
+ values. (For additional environment variables, see
+ linkend="libpq-envars">.) It is also convenient to have a
+ ~/.pgpass> file to avoid regularly having to type in
+ passwords. See for more information.
- Default database to connect to
+ Default connection database