Created
January 15, 2017 08:22
-
-
Save weldpua2008/daabf6d69212a1245e09ed245f9a8c4f to your computer and use it in GitHub Desktop.
How to grant all psgress tables in RDS to portal
This file contains 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
psql_host=.us-east-1.rds.amazonaws.com | |
for i in `echo '\d' | psql -h ${psql_host} -U postgres -d informationmodel |grep public|awk '{print $3}'`; do psql -h ${psql_host} -U postgres -d informationmodel -c "grant all on table $i to portal;"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment