Fix database permission check for triggers on Amazon RDS
On some instances of Amazon RDS, running a SELECT against `'information_schema.role_table_grants'` fails with a `permission denied for relation pg_authid` error. This happens because `role_table_grants` is a PostgreSQL view that ultimately accesses the `pg_authid` table. The PostgreSQL system function `has_table_privileges` doesn't actually need a FROM clause. We can simplify the query to just call: SELECT has_table_privilege('projects', 'TRIGGER') Closes https://gitlab.com/gitlab-org/gitlab/issues/199468
Showing
Please register or sign in to comment