PostgreSQL permissions explained PostgreSQL permissions explained postgresql postgresql

PostgreSQL permissions explained


The error says permission denied for schema public (emphasis mine)

You need to give readonlyuser rights on schema public:

GRANT USAGE ON SCHEMA public TO readonlyuser;

The contents of the ACL is explained on this page. The most relevant part quoted here:

rolename=xxxx -- privileges granted to a role =xxxx -- privileges granted to PUBLIC

        r -- SELECT ("read")        w -- UPDATE ("write")        a -- INSERT ("append")        d -- DELETE        D -- TRUNCATE        x -- REFERENCES        t -- TRIGGER        X -- EXECUTE        U -- USAGE        C -- CREATE        c -- CONNECT        T -- TEMPORARY  arwdDxt -- ALL PRIVILEGES (for tables, varies for other objects)        * -- grant option for preceding privilege    /yyyy -- role that granted this privilege

The + are part of the way psql formats the result, they are not part of the value.