Date: 04-02-08 15:57
Ever been in psql and wanted to issue a command without leaving psql? Find out how much disk space is available?
[student@student165 Desktop]$ psql payroll
Welcome to psql 8.3.0, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
Install Zend Studio Professional.desktop payroll.sql postgresql-8.3.0 postgresql-8.3.0.tar.gz Zend Studio Professional.desktop
student pts/0 2008-02-04 05:28 (:0.0)
payroll=# \!uname -a
Linux student165.example.com 184.108.40.206-60.fc7 #1 SMP Mon Jan 14 22:15:08 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
In short, prefix your command with \! and it is as if you were at the command prompt.