Search code examples
postgresqlrights

PGsql : Grant every single right to a user on a schema


I can't figure out how to give every single right to a specific user, I want a user to have every single right on a schema:

  • inserts, deletes, updates, selects, ... on existing tables

I have tried doing :

    GRANT ALL PRIVILEGES ON SCHEMA schema to "user";
    GRANT ALL ON SCHEMA schema to "local_518561";
    GRANT ALL PRIVILEGES ON table schema.table to "user";
    GRANT ALL ON table schema.table to "user";

The querys return succesfull, but every time I use the other user I get insuffiecent permissions error.


Solution

  • The answer lies in the sequences, if you do not give rights to the table AND the sequence (if any) than you cannot insert.