0

Grant All Tables

Posted February 8th, 2009. Filed under Sharing elmu

This is simple example how to grant all tables in specific schema for Postgresql or its similar like Greenplum.

See this command :

psql -t -c "\dt schema_name.*" | awk '{ if ($1!="") print "GRANT privileges ON public."$3" TO user;"}'

You need to spool command above to a file and run it as follows:

grant.jpg

If you have enjoyed this entry. Please feel free to bookmark it using your favorite social bookmarking site

Leave a Comment