Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf/6166~1
Choose a base ref
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf/6166
Choose a head ref
  • 2 commits
  • 6 files changed
  • 3 contributors

Commits on Dec 12, 2025

  1. Add functions to generate DDL for recreating roles.

    pg_get_role_ddl(regrole) returns the DDL needed to recreate a role
    as a single text string.  pg_get_role_ddl_statements(regrole) returns
    the same thing as a set of rows, one per DDL statement.
    
    The output includes the CREATE ROLE statement with all role attributes,
    plus any ALTER ROLE SET configuration parameters (both role-wide and
    database-specific settings).
    
    Passwords cannot be included, since we can only see the hashed values.
    System roles (names starting with "pg_") are rejected, since users
    shouldn't be recreating those anyway.
    
    Co-authored-by: Mario Gonzalez <gonzalemario@gmail.com>
    Co-authored-by: Bryan Green <dbryan.green@gmail.com>
    Reviewed-by: li carol <carol.li2025@outlook.com>
    2 people authored and Commitfest Bot committed Dec 12, 2025
    Configuration menu
    Copy the full SHA
    988c03a View commit details
    Browse the repository at this point in the history
  2. [CF 6166] v3 - Add pg_get_role_ddl() functions for role recreation

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/6166
    
    The branch will be overwritten each time a new patch version is posted to
    the thread, and also periodically to check for bitrot caused by changes
    on the master branch.
    
    Patch(es): https://www.postgresql.org/message-id/CAFsReFWO1f5coPu8UQBq9HR7KFWo5+dFmiU+pH8ZRVoSQk95uw@mail.gmail.com
    Author(s): Mario Gonzalez, Bryan Green
    Commitfest Bot committed Dec 12, 2025
    Configuration menu
    Copy the full SHA
    4e32142 View commit details
    Browse the repository at this point in the history
Loading