title: Postgres: Permission denied for schema even though grants were given
body: <p>I am running Postgres 10.4 and am currently baffled since I can't seem to grant access to a schema to another role.</p>
  
  <p>What I want to do:</p>
  
  <p>I have one role with one schema and want to access the schema and its tables from another role. So I did the usual (what worked with other schemas):</p>
  
  <pre><code>grant usage on schema myschema to newuser;
  
  grant select on all tables in schema myschema to newuser;
  </code></pre>
  
  <p>Both of those statements were run as the owner of the schema. I didn't run into any errors while doing so.</p>
  
  <p>When I log in as the newuser and try to select some data:</p>
  
  <pre><code>select * from myschema.table;
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>SQL Error [42501]: ERROR: permission denied for schema myschema
  </code></pre>
  
  <p>I can see that the newuser has the right privileges in the table "information_schema.role_table_grants"</p>
  
  <p>It also worked with another role and another schema. I'm clueless.</p>