Полезная информация

next up previous contents index
Next: PGACCESS Up: Interfacing to the POSTGRESQL Previous: Additional PSQL Commands

PSQL command-line arguments

You can change the behavior of psql in other ways. You normally start psql from the command line as psql test. However, you can add extra arguments between psql and the database name to modify psql behavior. For example, psql -f file test will read commands from file, rather than from your keyboard. There is a summary of the options in table [*]. Consult the psql manual page for more detailed information.

 
Table: psql command-line arguments
Option Capability psql Argument
  Field justification -A
  Field separator -F separator
  No column titles and row counts -t
  Extended output format -x
  Echo query -e
Controlling Output Echo \d query -E
  Quiet mode -q
  HTML output -H
  HTML table options -T options
  List databases -l
  Disable readline -n
  Execute query -c query
  Get queries from file -f file
Automation Output to file -o file
  Single-step mode -s
  Single-step with newline termination -S
  Hostname -h hostname
Connection Port -p port
  Password -u



 


next up previous contents index
Next: PGACCESS Up: Interfacing to the POSTGRESQL Previous: Additional PSQL Commands
Bruce Momjian
1999-11-21