pg_init_privs records information about the initial privileges of objects in the system. There is one entry for each object in the database which has a non-default (non-NULL) initial set of privileges.
Objects can have initial privileges either by having those privileges set when the system is initialized (by initdb) or when the object is created during a
CREATE EXTENSION and the extension script sets initial privileges using the
GRANT system. Note that the system will automatically handle recording of the privileges during the extension script and that extension authors need only use the
REVOKE statements in their script to have the privileges recorded. The
privtype column indicates if the initial privilege was set by initdb or during a
CREATE EXTENSION command.
Objects which have initial privileges set by initdb will have entries where
'i', while objects which have initial privileges set by
CREATE EXTENSION will have entries where
|any OID column||The OID of the specific object|
|The OID of the system catalog the object is in|
| For a table column, this is the column number (the |
|A code defining the type of initial privilege of this object; see text|
|The initial access privileges; see GRANT and REVOKE for details|