I want sql script of postgres 9 database schema which is not on local server. I tried pg_dump command on sql editor of pgAdmin and its not working there. I m not sure where to run that command. Please assist me with the same.... Thanks..
Asked
Active
Viewed 5.8k times
2 Answers
53
pg_dump
is a command line utility; it isn't SQL, so it won't work in pgAdmin or anywhere else that executes SQL.
pgAdmin
however does have a facility to do what you want:
- Right-click on the database you want to export
- Select
Backup
from the pop-up menu - Chose "format"
Plain
- Chose "plain option"
Only schema

Bohemian
- 412,405
- 93
- 575
- 722