psql (1) Linux Manual Page
NAME
psql – PostgreSQL interactive terminal
SYNOPSIS
-
psql[option…] [dbname[username]]
DESCRIPTION
OPTIONS
-a, –echo-all
- Print all nonempty input lines to standard output as they are read. (This does not apply to lines read interactively.) This is equivalent to setting the variable ECHO to all.
-A, –no-align
- Switches to unaligned output mode. (The default output mode is otherwise aligned.)
-c command, –command=command
- Specifies that psql is to execute one command string, command, and then exit. This is useful in shell scripts. Start-up files (psqlrc and ~/.psqlrc) are ignored with this option.
command must be either a command string that is completely parsable by the server (i.e., it contains no psql-specific features), or a single backslash command. Thus you cannot mix SQL and psql meta-commands with this option. To achieve that, you could pipe the string into psql, for example: echo ‘
