PostgreSQL interactive terminal |
-h hostname --host hostname Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix-domain socket. |
-d dbname --dbname dbname Specifies the name of the database to connect to. This is equivalent to specifying dbname as the first non-option argument on the command line. If this parameter contains an = sign, it is treated as a conninfo string. See in the documentation for more information. |
psql [ option... ] [ dbname [ username ] ] -d dbname --dbname dbname Specifies the name of the database to connect to. This is equivalent to specifying dbname as the first non-option argument on the command line. If this parameter contains an = sign, it is treated as a conninfo string. See in the documentation for more information. -U username --username username Connect to the database as the user username instead of the default. (You must have permission to do so, of course.) |