↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Functions / System Information Functions And Operators

has_database_privilege

Read the PG 18 manual

Does user have privilege for database? Allowable privilege types are CREATE, CONNECT, TEMPORARY, and TEMP (which is equivalent to TEMPORARY).

Reading PG 18current·documented in 25 of 27 versions, 7.3 to 20

Signatures & examples

has_database_privilege ( [ user name or oid, ] database text or oid, privilege text ) → boolean
Does user have privilege for database? Allowable privilege types are CREATE, CONNECT, TEMPORARY, and TEMP (which is equivalent to TEMPORARY).
Version history 4
  1. 12 → 13 changed
  2. 7.4 → 8.0 changed
  3. 7.3 → 7.4 changed
  4. 7.2 → 7.3 added

Definition snapshot: b7bd9cda · English manual source