PostgreSQL/pgAdminIII – Send Command Line Commands via UI

pgadminpostgresqlpsql

Using PostgreSQL / pgAdminIII, is it possible to send command line commands to PostgreSQL via the UI? Put another way: how can I access the command line via the pgAdminIII?

As I am coming up to speed on pgAdminIII, occasionally it seems like it would be useful. Ex: I search for a solution to an issue, but all I find is a solution that involves the command line, not the pgAdminIII UI.

Edit:

Maybe I am not understanding something more fundamental here, or maybe I am not using the proper terminology, but for example in this link Jay Taylor's answer seems to use the command line commands I am referring to:
https://stackoverflow.com/questions/760210/how-do-you-create-a-read-only-user-in-postgresql

In this link Bruno's answer uses them:
https://stackoverflow.com/questions/20775462/cant-grant-user-privileges-to-postgresql-database-for-a-rails-app

In this link there are several references to them:
https://jamie.curle.io/creating-a-read-only-user-in-postgres

Explicitly, from the last link above, how would I send something like this to PostgreSQL/the server from pgAdminIII (not that I actually want to):

 pg_dump -O -Fc  --format=t productiondb -U backup_user -h localhost 

Best Answer

If by "command line" you mean the client program psql, then the answer is no. psql is just another client program like pgAdminIII.

If you have configured File -> Options -> Browswer -> Binary paths -> PG bin path in pgAdminIII, there is a shortcut to open psql:

How to open psql from within pgAdmin


pg_dump is another separate client application. You run it from the shell of your OS. You don't "send it to Postgres". But you can optionally call it from within pgAdmin. See Tools -> Backup...

All commands starting with the shell prompt $ in Jay Taylor's answer are also commands to run in the shell. Be sure to connect to the right DB.