Re: pg_restore ERROR: permission denied to change default privileges - Mailing list pgsql-general

From Rachel Roch
Subject Re: pg_restore ERROR: permission denied to change default privileges
Date
Msg-id OShaniJ--F-9@tutanota.de
Whole thread Raw
In response to pg_restore ERROR: permission denied to change default privileges  (Rachel Roch <rroch@tutanota.de>)
Responses Re: pg_restore ERROR: permission denied to change default privileges
List pgsql-general


13 Jun 2025, 20:13 by adrian.klaver@aklaver.com:

>
> To get at an editable script you can do something like:
>
> pg_restore -f my_database_txt.sql  my_database.dump
>
> This will give you a plain text version of the dump that you can feed back to psql to load into remote database.
>

Thanks Adrian !

I had thought maybe maybe I could do a "pg_restore -l my_database.dump" and ignore the relevant line using whatever the
otherflag is, but sadly there doesn't appear to be enough flexibility, i.e.  

pg_restore -l my_database.dump | fgrep -F postgres
gives:
2067; 826 16607 DEFAULT ACL public DEFAULT PRIVILEGES FOR TABLES postgres

But

pg_restore -l my_database.dump | fgrep -F my_database_ro
gives nothing.   :(

So either your solution or Tom's "just ignore it" sound like they'll work.



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: pg_restore ERROR: permission denied to change default privileges
Next
From: Adrian Klaver
Date:
Subject: Re: pg_restore ERROR: permission denied to change default privileges