Skip to content

Commit

Permalink
Add no-owner option to pg_restore when passed to the main program
Browse files Browse the repository at this point in the history
This removes owner clauses for the objects that are dumped using
pg_restore (e.g. functions).
  • Loading branch information
olasd committed Apr 20, 2017
1 parent b3c2d74 commit 75f2c97
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pg_extractor.py
Expand Up @@ -1290,6 +1290,8 @@ def _run_pg_restore(self, list_file, output_file):
restore_cmd.append("--file=" + output_file)
if self.args and self.args.clean:
restore_cmd.append("--clean")
if self.args and self.args.no_owner:
restore_cmd.append("--no-owner")
restore_cmd.append(self.tmp_dump_file.name)
if self.args.debug:
self._debug_print("EXTRACT RESTORE: " + str(restore_cmd))
Expand Down

0 comments on commit 75f2c97

Please sign in to comment.