user_info
user_info · Provides user-related information including owned objects and granted roles.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100455 | user_info | user_info | 0.0.1 | SEC | BSD-2-Clause | SQL |
Usage
Sources:
user_info version 0.0.1 provides catalog-reporting functions for role membership, owned objects, and directly granted privileges. The project is archived and its SQL targets old PostgreSQL catalogs, so use it as historical diagnostic code rather than a current authorization authority.
Core Workflow
Functions accept a role OID, role name, or, where available, no argument for the current user:
user_objects(...) unions several system-catalog and information-schema reports, so a single table can appear as a relation, table, row type, and array type. Duplicates across object categories are expected rather than automatically deduplicated.
Reporting Limits
granted_roles(...) recursively returns membership paths and levels. granted_roles_pretty(...) formats the same hierarchy for people. accessible_objects(...) reports privileges explicitly granted directly to the selected role.
The privilege report does not include default privileges or permissions inherited through other roles, and therefore does not calculate effective access. It also relies on catalog layouts and object classes from the extension’s era; installation or queries may fail on modern PostgreSQL, and newer object types are not covered. Validate every result against current PostgreSQL catalog and privilege functions before using it for review, and do not use it alone for security or compliance decisions.