

This is similar to the meta-command \list. Other non-connection options are ignored. This is equivalent to \pset format html or the \H command. If the value begins with a slash, it is used as the directory for the Unix-domain socket. Specifies the host name of the machine on which the server is running. This is equivalent to \pset fieldsep or \f. Use separator as the field separator for unaligned output. This is in many ways equivalent to the meta-command \i. After the file is processed, psql terminates. Use the file filename as the source of commands instead of reading commands interactively. This is equivalent to setting the variable ECHO to queries. This is equivalent to specifying dbname as the first non-option argument on the command line.Ĭopy all SQL commands sent to the server to standard output as well. Secifies the name of the database to connect to. Start-up files (psqlrc and ~/.psqlrc) are ignored with this option. Specifies that psql is to execute one command string, command, and then exit. This is equivalent to setting the variable ECHO to all. Print all nonempty input lines to standard output as they are read. It enables you to type in queries interactively, sent them to PostgreSQL, and see the query results. Psql is a terminal-based front-end to PostgreSQL. To list all of the tables, views, and sequences in the database, type \z.To list the database's tables and their respective owners, type \dt.


Running the PostgreSQL interactive terminal program, called psql, which allows you to interactively enter, edit, and execute SQL commands. Connect to PostgreSQL from the command line
