hy8jpa
Last Updated: February 25, 2016
·
5.652K
· bartlomiejdanek
Bard2

Dump PostgreSQL without owner and privileges

$ pg_dump database_name -O -x > output_file

Then you shouldn't see

--
-- Name: public; Type: ACL; Schema: -; Owner: username
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM username; 
GRANT ALL ON SCHEMA public TO username;
GRANT ALL ON SCHEMA public TO PUBLIC;

And

--
-- Name: _RETURN; Type: RULE; Schema: public; Owner: username
--
Say Thanks
Respond