title: What does GRANT USAGE ON SCHEMA do exactly?
body: <p>I'm trying to create a Postgres database for the first time.</p>
  <p>I assigned basic read-only permissions to the DB role that must access the database from my PHP scripts, and I have a curiosity: If I execute</p>
  <pre><code>GRANT some_or_all_privileges ON ALL TABLES IN SCHEMA schema TO role;
  </code></pre>
  <p>is there any need to also execute this?</p>
  <pre><code>GRANT USAGE ON SCHEMA schema TO role;
  </code></pre>
  <p>From the <a href="http://www.postgresql.org/docs/9.1/static/sql-grant.html" rel="noreferrer">documentation</a>:</p>
  <blockquote>
  <p>USAGE: For schemas, allows access to objects contained in the
  specified schema (assuming that the objects' own privilege
  requirements are also met). Essentially this allows the grantee to
  &quot;look up&quot; objects within the schema.</p>
  </blockquote>
  <p>I think that if I can select or manipulate any data contained in the schema, I can access to any objects of the schema itself. Am I wrong? If not, what is <code>GRANT USAGE ON SCHEMA</code> used for? And what does the documentation mean exactly with &quot;assuming that the objects' own privilege requirements are also met&quot;?</p>