Skip to content

test: role spec forms and unset settings - #269

Open
utkarash2991 wants to merge 3 commits into
utkarashsingh/psqlext-1816-hook-formsfrom
utkarashsingh/psqlext-1816-role-tests
Open

utkarash2991 wants to merge 3 commits into
utkarashsingh/psqlext-1816-hook-formsfrom
utkarashsingh/psqlext-1816-role-tests

Conversation

@utkarash2991

@utkarash2991 utkarash2991 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Two small tests for cases no existing test covers.

role_spec_forms runs the alter role all forms, including in database, as nonsuper and privileged_role. None of them names a role, so all of them should end in core's own permission error.

settings_unset resets every supautils setting to its default, reconnects, and runs a few role, extension and policy statements as nonsuper and privileged_role. All of them should fall through to core. For reset to reach the default, the settings move from init.conf to an alter system block in init.sql.

Stacked on #260.

@utkarash2991
utkarash2991 requested a review from a team as a code owner October 29, 2026 12:35
@utkarash2991
utkarash2991 added this pull request to stack #261 October 29, 2026 12:43
@utkarash2991
utkarash2991 force-pushed the utkarashsingh/psqlext-1816-role-tests branch from 0c673d3 to 656030f Compare October 29, 2026 12:44
@utkarash2991
utkarash2991 force-pushed the utkarashsingh/psqlext-1816-role-tests branch 2 times, most recently from 4007ebb to 49bbfaf Compare October 29, 2026 23:01
xpg now installs src/test/modules/unsafe_tests into its regress output.
Pinned to the commit until the next xpg tag.
None of these forms names a role, so the hook has nothing to check and
every one of them has to end in core's own permission error. The IN
DATABASE form was not exercised anywhere else.
Move the supautils settings from init.conf to an alter system block in
init.sql so a test can reset them to their defaults. settings_unset does
that, reconnects, and runs role, extension and policy statements as
nonsuper and privileged_role; all of them have to fall through to core.
@utkarash2991
utkarash2991 force-pushed the utkarashsingh/psqlext-1816-role-tests branch from 49bbfaf to ec87abc Compare November 1, 2026 12:13

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant