Difference between revisions of "ERROR: permission denied for relation"

From wikieduonline
Jump to navigation Jump to search
 
(10 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
  
  [[GRANT ALL PRIVILEGES ON TABLE]] your-table TO your-user;
+
<code>[[GRANT ALL PRIVILEGES ON TABLE]] your-table TO your-user;</code>
  
  
SELECT grantee, privilege_type FROM information_schema.role_table_grants WHERE table_name='mytable';
+
<code>SELECT grantee, privilege_type FROM information_schema.role_table_grants WHERE table_name='mytable';</code>
  
 +
SELECT grantor, grantee, table_schema, table_name, privilege_type FROM information_schema.table_privileges WHERE grantee = 'myuser'
 +
 +
== Related ==
 +
* <code>[[GRANT SELECT ON mytable TO xxx]]</code>
 +
* [[\du++]]
  
 
== See also ==
 
== See also ==
* {{PostgreSQL}}
+
* {{Role}}
 +
* {{GRANT}}
 +
* {{psql}}
 +
 
 +
[[Category: PostgreSQL]]
 +
[[Category: SQL]]

Latest revision as of 11:55, 27 September 2022


GRANT ALL PRIVILEGES ON TABLE your-table TO your-user;


SELECT grantee, privilege_type FROM information_schema.role_table_grants WHERE table_name='mytable';

SELECT grantor, grantee, table_schema, table_name, privilege_type FROM information_schema.table_privileges WHERE grantee = 'myuser'

Related[edit]

See also[edit]

Advertising: