Created
January 21, 2016 20:19
-
-
Save debuggerpk/6f8b2b9e8e6039f011e2 to your computer and use it in GitHub Desktop.
correct pg_dump for amazon rds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT exec('ALTER TABLE ' || quote_ident(s.nspname) || '.' || quote_ident(s.relname) || ' OWNER TO rds_superuser;') | |
| FROM ( | |
| SELECT nspname, relname | |
| FROM pg_class c JOIN pg_namespace n ON (c.relnamespace = n.oid) | |
| WHERE nspname in ('tiger','topology') AND | |
| relkind IN ('r','S','v') ORDER BY relkind = 'S') | |
| s; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment