opscode-cookbooks/database — pull request #92 by stissot (2014-10-30 17:23:06+00:00)
Title: Grant permissions on selected tables, sequences and functions inside a postgresql schema

The current `database_postgresql_user` resource can only set perms at the database and schema levels which is not enough to replicate the flexibility and complexity of the [GRANT command](http://www.postgresql.org/docs/9.3/static/sql-grant.html) in PostgreSQL.

So I've added actions and attributes for granting perms on some or all tables, sequences and functions in a schema:
```ruby
# grant all privileges on all tables, sequences and functions in public schema of foo db
postgresql_database_user 'foo_user' do
connection postgresql_connection_info
database_name 'foo'
schema_name 'public'
tables [:all]
sequences [:all]
functions [:all]
privileges [:all]
action [:grant, :grant_schema, :grant_table, :grant_sequence, :grant_function]
end ```