pg_init_privs
The catalog 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 GRANT and 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 privtype is 'i', while objects which have initial privileges set by CREATE EXTENSION will have entries where privtype is 'e'.
English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.
Reading PG 18·Select a recorded version
- kind
- catalog
- lang
- en
- measured attributes
- true
- metadata release
- 18.6
- runtime columns
- objoid, classoid, objsubid, privtype, initprivs
- runtime verified
- false
- source
- english-manual
Definition PG 18
The catalog 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 GRANT and 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 privtype is 'i', while objects which have initial privileges set by CREATE EXTENSION will have entries where privtype is 'e'.
Catalog columns
| Column | Type | Nullability | Description |
|---|---|---|---|
| objoid | oid | Not null | The OID of the specific object |
| classoid | oid | Not null | The OID of the system catalog the object is in |
| objsubid | int4 | Not null | For a table column, this is the column number (the objoid and classoid refer to the table itself). For all other object types, this column is zero. |
| privtype | char | Not null | A code defining the type of initial privilege of this object; see text |
| initprivs | aclitem[] | Not null | The initial access privileges; see Section 5.8 for details |
Compare versions
Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · catalog-bilingual-repair:329a318f31f2ac09f9fd593a7d3c5cc9b9f5238eb23cfddb8eec3a8aead3ebe2
Text language: en · catalog-bilingual-repair:329a318f31f2ac09f9fd593a7d3c5cc9b9f5238eb23cfddb8eec3a8aead3ebe2