Implement --no-owner.
As per the pg_restore documentation: Do not output commands to set ownership of objects to match the original database. By default, pg_restore issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail unless the initial connection to the database is made by a superuser (or the same user that owns all of the objects in the script). With -O, any user name can be used for the initial connection, and this user will own all the created objects. Now, pgcopydb only has to pass the command line option down to pg_restore. Fixes #3.
parent
1413caab
Please register or sign in to comment