0

I am trying to build a script which scripts only the privileges from the objects of the databases such as tables, triggers, sequence, functions, etc. I am not able to find any parameter in pg_dump that would help achieve it.

If I use the below command, it creates the script with CREATE table as well as the privileges associated.

pg_dump --host=<> --port=5432 --username=sa --password --schema-only dbname=export -f mydbdump.sql

Am I missing any parameter that would help avoid CREATE DDLs in pg_dump with just the privileges on the table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.