How to update pg_opclass as non-postgres superuser I'm using poorly documented third-party software that does esoteric things with PostgreSQL 9.3.  At some point during its setup, it attempts the following:

UPDATE pg_opclass SET opckeytype=xxxx WHERE ...;


The statement is running as a database superuser (though not postgres), and fails with this error:

ERROR:  permission denied for relation pg_opclass


What permissions do I need to grant to allow this statement to work?

Note #1:  I tried granting all permissions on that table to no avail. 
 \z from psql reports the following (zzz is my superuser's name):

mydb=# \z pg_catalog.pg_opclass
                                 Access privileges
   Schema   |    Name    | Type  |  Access privileges   | Column access privileges
------------+------------+-------+----------------------+--------------------------
 pg_catalog | pg_opclass | table | =r/postgres         +|
            |            |       | zzz=arwdDxt/postgres |
(1 row)

mydb=#


Note #2: The exact same statement, when run as the postgres user, works just fine.
It turns out there's a (somewhat hidden) permission for users, namely whether they have permission to "update system catalogs directly," which is specified by the rolcatupdate column in the pg_authid system table:

https://www.postgresql.org/docs/9.3/static/catalog-pg-authid.html

This other answer talks about how to set it:

https://serverfault.com/a/300421

Anyhow, once I set it to TRUE for my user, the UPDATE was allowed.

That column in pg_authid appears to have gone away as of PostgreSQL 9.5.