title: ERROR: permission denied for schema user1_gmail_com at character 46
body: <p>I need to restrict a user, access only on a particualr schema tables only.So I tried following query and login as user1_gmail_com. But I got following error when I try to browse any schema table. </p>
  
  <p><strong>My Query:</strong></p>
  
  <pre><code>SELECT clone_schema('my_application_template_schema','user1_gmail_com');
  CREATE USER user1_gmail_com WITH PASSWORD 'myloginpassword';
  REVOKE  ALL ON ALL TABLES IN SCHEMA user1_gmail_com FROM PUBLIC;
  GRANT SELECT ON ALL TABLES IN SCHEMA user1_gmail_com TO user1_gmail_com;
  </code></pre>
  
  <p><strong>SQL error:</strong></p>
  
  <pre><code>ERROR:  permission denied for schema user1_gmail_com at character 46
  In statement:
  SELECT COUNT(*) AS total FROM (SELECT * FROM "user1_gmail_com"."organisations_table") AS sub
  </code></pre>
  
  <p><strong>Updated Working Query:</strong></p>
  
  <pre><code>SELECT clone_schema('my_application_template_schema','user1_gmail_com');
  CREATE USER user1_gmail_com WITH PASSWORD 'myloginpassword';
  REVOKE  ALL ON ALL TABLES IN SCHEMA user1_gmail_com FROM PUBLIC;
  GRANT USAGE ON SCHEMA user1_gmail_com TO user1_gmail_com;
  GRANT SELECT ON ALL TABLES IN SCHEMA user1_gmail_com TO user1_gmail_com;
  </code></pre>