↑↓ 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

Reconstructs the CREATE ROLE statement and any ALTER ROLE ...

Reading PG 20devel·documented in 1 of 27 versions, 20 to 20

Development snapshot. These definitions may change before release.

Signatures & examples

pg_get_role_ddl ( role regrole [, pretty boolean DEFAULT false] [, memberships boolean DEFAULT true] ) → setof text
Reconstructs the CREATE ROLE statement and any ALTER ROLE ... SET statements for the given role. Each statement is returned as a separate row. Password information is never included in the output. When pretty is true, the output is pretty-printed. When memberships is false, GRANT statements for role memberships are omitted.
Version history 1
  1. 19 → 20 added

Definition snapshot: b7bd9cda · English manual source