ERROR: syntax error at or near "psql"

I need quick help I am using PgAdmin 4 and there tool sql command box and I am running below command but I am getting below error.

Command : psql -u adminuser@ServerNamep.postgres.database.azure.com -h ServerNamep.postgres.database.azure.com -d postgres -f F:\PGBackup\JiVsDB.out

Error : ERROR: syntax error at or near “psql”

This is a command, which is used in terminal

This is an error, which indicates, the command above had been fired in sql environment (like pgadmin offers it).

So use a terminal with a postgres client installation in place and fire your command.

Since I don’t know pgadmin 4, this information migth be incorrect and pgadmin 4 is also able to run such a command (by offering a console feature itself)

the sql-query-tool in pgadmin is for pure sql-commands, but your command is for the command shell to start psql, the command-line-interface for PostgreSQL. Please don’t just copy everything you find somewhere on the internet without understanding it. By the way, this is a German forum.

Not putting from internet we are getting this error I do understand from above answer. Thanls

Vielen Dank für Ihre Antwort, sie war sehr hilfreich für mich, ich habe es geschafft, alles zu lösen.

Dieses Thema wurde automatisch 60 Tage nach der letzten Antwort geschlossen. Es sind keine neuen Antworten mehr erlaubt.