title: ERROR: permission denied for relation tablename on Postgres while trying a SELECT as a readonly user
body: <pre><code>GRANT SELECT ON ALL TABLES IN SCHEMA public TO readonly;
  </code></pre>
  
  <p>The readonly user can connect, see the tables but when it tries to do a simple select it gets:</p>
  
  <pre><code>ERROR: permission denied for relation mytable
  SQL state: 42501
  </code></pre>
  
  <p>This is happening on PostgreSQL 9.1</p>
  
  <p>What I did wrong?</p>