Site icon Database Tutorials

Running an Operating System Command while Connected to Postgres

 

You are processing in psql, but you need to look at something on the operating system side, so you must exit from the psql and connect to Psql again.

But with the command “\!”, you can run the operating system command without exiting psql.

The use is as follows.

Exit mobile version