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

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

Controlling Query Buffer

You can easily control the psql query buffer. Table [*] summarizes the commands. See the psql manual page for a full description of each item. There is one item of particular interest, edit (\e). This allows you to use your default editor to edit the query buffer. Type \e, and the current contents of the query buffer are loaded into your editor. Exit the editor, and the editor contents are reloaded into your query buffer, ready for execution.18.1

 
Table: psql query buffer commands
Function psql Command
Print \p
Execute \g or semicolon
Quit \q
Edit \e
Edit and execute \E
Backslash help \?
SQL help \h command
Include file \i
Output to command/file \o file/ |command
Print/Save query history \s file
Write buffer to file \w file
Run subshell \!



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