Skip to content

Fire the event trigger for DROP SCHEMA and DROP OWNED - #55

Merged
jnasbyupgrade merged 56 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:when-tag
Nov 5, 2026
Merged

jnasbyupgrade merged 56 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:when-tag

Conversation

@jnasbyupgrade

@jnasbyupgrade jnasbyupgrade commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

BREAKING: registered SQL now runs with search_path = pg_catalog, pg_temp, so SQL registered with extension_drop__add()/extension_drop__update() must schema-qualify everything it uses or the DROP fails. See README.md and HISTORY.asc.

extension_drop's event trigger now fires for DROP SCHEMA and DROP OWNED as well as DROP EXTENSION, so an extension dropped by DROP SCHEMA ... CASCADE or DROP OWNED BY runs its registered SQL and has its registration removed instead of leaving a stale row in extension_drop__commands (which makes every later DROP EXTENSION raise XD001).

These three are the only commands that can drop an extension: an extension has ordinary pg_depend rows only on its schema and on any extension it requires, so it goes away via DROP EXTENSION (including cascading to dependents), DROP SCHEMA ... CASCADE, or DROP OWNED, which walks shdepend.

User-visible behavior. Any role that can drop an extension can do so without privileges on extension_drop__commands, whether or not the extension is registered. The registered SQL runs as the dropping role, so that role needs whatever the SQL needs. A stale registration still fails the drop with XD001.

Mechanism. After an early return for drops that involve no extension, the event trigger (SECURITY INVOKER) calls _extension_drop__dropping() and executes each returned SQL statement as the dropping role, in no particular order. _extension_drop__dropping() is the only SECURITY DEFINER function: pinned to pg_catalog, pg_temp, executable by PUBLIC, it runs DELETE ... USING pg_event_trigger_dropped_objects() ... RETURNING, then extension_drop__sanity_assert(), and returns the deleted (extension_name, sql) rows. It never executes the SQL. Called outside a sql_drop trigger, pg_event_trigger_dropped_objects() errors, so a direct call cannot delete the registration of a live extension. extension_drop__sanity_assert() and extension_drop__sanity_check() run with the owner's rights when called from the dropping function; both carry a warning comment and were reviewed as definer code (pinned path, own objects only through @extension_schema@, no dynamic SQL, arguments only compared).

Every permanent function sets search_path = pg_catalog, pg_temp and references its own objects through the extension schema. Registered SQL runs under the trigger's own search_path = pg_catalog, pg_temp, restored after each registration so one registration's path change doesn't reach the next, so it must schema-qualify everything it uses (its own extension's objects, cat_tools, extension_drop's functions). This can break existing registrations and is flagged in HISTORY.asc and README.

PUBLIC USAGE. PUBLIC must have USAGE on extension_drop's schema, since the trigger calls the dropping function as the dropping role. CREATE EXTENSION and ALTER EXTENSION ... UPDATE fail otherwise, and two event triggers on REVOKE and DROP OWNED (extension_drop__usage_guard, extension_drop__usage_guard_start) protect it afterwards. The errors follow the PostgreSQL message style guide: a short primary message (cannot install extension_drop in schema "x", cannot update extension_drop in schema "x", PUBLIC lacks USAGE on schema "x", cannot remove USAGE on schema "x" from PUBLIC), the requirement and DDL command: <tag> in DETAIL, and a HINT with the exact GRANT where there is something to run.

ALTER EVENT TRIGGER can't change WHEN, so extension_drop--0.1.1--stable.sql drops and recreates the trigger and replaces every function through the same create_function calls as the install script.

Tests. Suites: simple (also covers DROP OWNED, DROP SCHEMA ... CASCADE, several registered extensions dropped by one command, the registered-SQL search_path, a nested _extension_drop__dropping(), and extension_drop__update()/__remove() touching only the named registration), drop_denied (privileges, definer checks, the XD001 text, unrelated drops), public_usage, sanity_assert_overload (own file: plpgsql caches plans per session) and dependency_guard. In drop_denied, most scenarios run through pg_temp.xd_scenario, which rolls back each one in an exception subblock; only the stale and planted groups still use explicit savepoints. simple and sanity_assert_overload use savepoints directly. test/deps.sql has a HINT/DETAIL capture helper (xd_capture) and a role helper (xd_as(role, sql): runs the SQL as the role, then resets it), each used at every site. Native pgTAP assertions replace raw catalog queries where one exists (table_privs_are, is_empty); drop_denied defines the member-function query once, as the temp view xd_members rather than a psql variable, and asserts the member functions as (proname, prosecdef) rows with bag_eq against the expected set (only _extension_drop__dropping is SECURITY DEFINER), so an added function, overload or definer flag fails the test; bag_eq is order-insensitive; has_schema_privilege, the proconfig and extversion checks stay raw, each with a comment (schema_privs_are/functions_are assert exact sets, which fail in existing mode where the extension shares public).

Verified. At head d3d6e18: make test on PG17 (6/6 plus build) and make test-update pass, make lint returns rc=0, make test PG_CONFIG=/usr/lib/postgresql/12/bin/pg_config on PG12 passes (6/6 plus build), and CI is green on PG12-17, the three binary pg_upgrade legs (12 → 13, 12 → 17, 16 → 17), pg_tle 12-17, SQL Lint and all-checks-passed at d3d6e18 (run 41914413381; CodeRabbit and claude-review skipped). The bin/test_existing runs (PG17, scratch database, no real pg_upgrade; the real pg_upgrade legs ran in CI) were at 007d795 and were not re-run at d3d6e18. Commits after d3d6e18 change only the placement of statement terminators in the two SQL scripts, test/sql/drop_denied.sql and test/sql/simple.sql, plus README.md (the pg_dump restore Known issues) and one CLAUDE.md word. The full CI matrix last ran on f0b1d58 and again at the current head 5d440df (run 41934572570, all jobs green, matrix not skipped); ea11739's SQL layout change was never matrix-tested on its own head, because its run was cancelled by the next push and the pushes after it were skipped as docs-only. make test (6/6 plus build), make test-update (6/6 plus build) and make lint (rc=0) were run locally on PG17 at 5d440df. 5d440df is an empty commit that changes no file.

Mutations at 36f69ec (before the dropping function was renamed to _extension_drop__dropping; not re-run after the rename, which changed no SQL logic), each turning the suite red: resetting the dropping function's search_path pin (drop_denied), making the event trigger SECURITY DEFINER (drop_denied), neutering the PUBLIC USAGE guard (public_usage), an extra SECURITY DEFINER member function with a new name, a SECURITY DEFINER overload of extension_drop__get, a SECURITY DEFINER overload of _extension_drop__dropping (all three caught by the bag_eq), the dropping function no longer SECURITY DEFINER (caught by the bag_eq and the drop scenarios), and removing xd_as's RESET ROLE (drop_denied, public_usage and sanity_assert_overload). Re-run against the rewritten tests at 165516f, both failed as expected: deleting the install script's per-registration search_path restore (simple went red), and giving the dropping function an unpinned search_path (the planted-operator and pin tests went red). The update script's search_path restore has not been mutated. Each replaced assertion's mutation was run only at earlier heads and is not re-run. The remaining claims below were run at 4384701/d5cc8e7; later commits change no SQL logic besides the search_path restore.

  • README lookup recipe (SELECT extension_drop__add('my_extension', format('SELECT %s.extension_drop__get(%L)', extnamespace::regnamespace, 'my_extension')) FROM pg_extension WHERE extname = 'extension_drop') run in psql on PG17 with extension_drop installed in schemas "xD s" and plain: the registered SQL was SELECT "xD s".extension_drop__get('extension_drop_test') and SELECT plain.extension_drop__get(...), and running the stored SQL returned the registered row. %I on the same value double-quotes it.
  • make test, make test-update and make lint pass (PG12 via PG_CONFIG=/usr/lib/postgresql/12/bin/pg_config).
  • bin/test_existing prepare plus run-suite pass on PG17 against a scratch database (no real pg_upgrade; not run on PG12).
  • Fresh install and update from 0.1.1 give identical function definitions, proacl, owner, comments, proconfig, event triggers, columns and schema ACLs, on PG12 and PG17, for schemas "xD s", "a""b%s" and "x$body$y". The event trigger's md5(prosrc) was compared again for the restore at 36f69ec (PG17): identical.
  • No ORDER BY remains in either SQL script. Neither the dropping function nor extension_drop__sanity_check() orders its output; the plural XD001 DETAIL lists names in no particular order. simple checks every registered SQL ran and every registration was removed as sets; drop_denied checks the plural wording and each name separately.
  • The dropping function is owned by the role that ran CREATE EXTENSION, or the ALTER EXTENSION ... UPDATE that first created it (checked with two superuser roles on PG17 at an earlier head; the SQL for it has not changed since).
  • Also fixed: extension_drop__update() and extension_drop__remove() compared the unqualified argument name, which resolves to the table column, so with two registrations each changed (update) or deleted (remove) every row. The argument is now qualified with the function name in both scripts; simple updates one of two registrations and removes one, and checks the other is unchanged.
  • Not run locally: the real pg_upgrade leg (CI only).
  • README "Known issues" restore recipes: both pg_dump restore problems were reproduced and each workaround tested on PG12 and PG17, with and without -x, in custom format (pg_restore) and plain SQL (psql); the commands were then extracted from the README and run verbatim on both versions. Not tested: restoring with a different major version than the dump, a non-superuser restoring role, schema names that need quoting.

`DROP SCHEMA ... CASCADE` and `DROP OWNED BY` can drop an extension, but
the trigger only fired for `DROP EXTENSION`. The registered SQL never ran
and the leftover row in `extension_drop__commands` made every later
`DROP EXTENSION` raise `XD001`.

The trigger's `WHEN tag` list now includes both tags. The update script
recreates the trigger, since `ALTER EVENT TRIGGER` cannot change `WHEN`.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 0e535db7-70c5-42bc-9a98-5c49de4d0fbe

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 30s —— View job


Review of PR #55: fire the event trigger for DROP SCHEMA and DROP OWNED

I read the diff and the trigger and sanity-check code. I did not build the extension or run the test suite. The code-review skill failed to run, so this is a manual review.

The change is small and consistent. The trigger WHEN list, the 0.1.1→stable update script, the README and HISTORY entries, and the new tests all agree with each other.

Concern: the trigger now fires for ordinary users (not verified by running it)

DROP EXTENSION is normally run by superusers. DROP SCHEMA and DROP OWNED BY are routine for non-superusers on their own objects. The trigger function is not SECURITY DEFINER. It reads extension_drop__commands and calls extension_drop__sanity_assert(). The install script creates these with '' grants, which revokes all access (sql/extension_drop.sql:113 and :255).

Event triggers run with the privileges of the user who issued the command. So a non-superuser running DROP SCHEMA myschema or DROP OWNED BY me may now fail with permission denied for function extension_drop__event_trigger. That would break DDL that has nothing to do with extensions.

There is a second, related effect. Any stale row in extension_drop__commands now makes every DROP SCHEMA and DROP OWNED raise XD001, not only DROP EXTENSION. The blast radius of a bad state is larger.

Suggestions:

  • Add a test that runs DROP SCHEMA and DROP OWNED BY as a non-superuser and confirms they still succeed. If they fail, make the trigger function SECURITY DEFINER with a pinned search_path (it already sets search_path FROM CURRENT).
  • Alternatively, skip the work when pg_event_trigger_dropped_objects() contains no object_type = 'extension' row. Do this before sanity_assert, so unrelated drops never hit the assertion. The PR says the trigger function is unchanged, so this would be a deliberate change from that.

Minor

  • The tests hide the drop cascades to notice with client_min_messages = WARNING in drop_schema_cascade.sql. drop_owned.sql has no such notice, so this is fine.
  • drop_owned.sql creates a SUPERUSER role. That is fine only because the test transaction is left open and rolled back, so make sure that stays true.
  • I found no bugs in the update script. Dropping and recreating the trigger is the right approach, since ALTER EVENT TRIGGER can't change WHEN.

Now that the trigger fires for every `DROP SCHEMA` and `DROP OWNED`, it
must not read `extension_drop__commands` or run the sanity assert for
drops that involve no extension: a non-superuser's ordinary drops failed
with a permission error, and a stale row broke unrelated drops.

The row variable is a `record` so the function compiles without access to
the extension's schema. Adds tests for non-superuser and stale-row
drops, and factors the shared post-drop assertions into a helper.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@jnasbyupgrade

Copy link
Copy Markdown
Contributor Author

Claude here. Addressing the review's non-superuser concern (confirmed by running it: a plain role's DROP SCHEMA and DROP OWNED BY failed with a permission error, and a stale row made unrelated drops raise XD001): extension_drop__event_trigger() now returns immediately unless pg_event_trigger_dropped_objects() contains an extension, before touching extension_drop__commands or the sanity assert. It also uses a record variable so it compiles for a role with no access to the extension's schema. New test unrelated_drops covers a non-superuser DROP SCHEMA ... CASCADE and DROP OWNED BY, and a superuser DROP SCHEMA while a stale row exists; it fails on the previous commit and passes now. SECURITY DEFINER was not used. The SUPERUSER role in drop_owned.sql is created inside the test transaction, which is rolled back.

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 21s —— View job


Review of PR #55: fire the event trigger for DROP SCHEMA and DROP OWNED

I read the diff, including the trigger SQL, the update script and test/sql/unrelated_drops.sql. I did not build the extension or run the tests.

I found no bugs. The earlier review's two concerns are both handled in the current head:

  • Non-superuser drops. The trigger function now returns early unless pg_event_trigger_dropped_objects() contains an extension row (sql/extension_drop.sql:270). Ordinary DROP SCHEMA and DROP OWNED BY calls therefore never read extension_drop__commands, which has no grants. unrelated_drops.sql:36-55 tests both commands as a non-superuser.
  • Stale rows. Because of the early return, a stale registration no longer makes unrelated drops raise XD001. unrelated_drops.sql:57-69 covers this by dropping a schema with a stale row present.

The fresh-install and 0.1.1→stable paths are consistent:

  • Both create the same function body and the same WHEN tag IN ('DROP EXTENSION', 'DROP SCHEMA', 'DROP OWNED').
  • The update script drops and recreates the trigger, which is needed because ALTER EVENT TRIGGER can't change WHEN.
  • The README and HISTORY text match the behavior.

Minor notes (no action required)

  • The PR description says "The trigger function is unchanged", but the diff adds the early return and changes r from a table-row type to record. The description is out of date, and the code is fine.
  • unrelated_drops.sql leaves the role extension_drop_test_plain and the GRANT CREATE ON DATABASE in place. This is fine only if test/finish.sql rolls back the transaction, so keep it that way. I didn't check that.
  • drop_owned.sql creates a SUPERUSER role. This has the same rollback caveat.

@jnasbyupgrade

Copy link
Copy Markdown
Contributor Author

Claude here. Decisions needed from the maintainer:

  1. Document known limits that predate this PR? A stale row or skipped cleanup can still occur when the event trigger is disabled (ALTER EVENT TRIGGER ... DISABLE), under session_replication_role = replica, and when the extension or schema holding extension_drop itself is dropped (other extensions' registered cleanup is silently skipped).
  2. Warn about existing stale rows on update? ALTER EXTENSION ... UPDATE does not repair rows left by earlier DROP SCHEMA / DROP OWNED; HISTORY.asc and the XD001 hint point to extension_drop__repair(). Options: leave as is, or RAISE WARNING in the update script when extension_drop__sanity_check() is non-empty. Auto-repair is not recommended: it could discard cleanup SQL that never ran.
  3. Structure for the follow-up PR. A follow-up (non-superuser DROP EXTENSION fix using a SECURITY DEFINER helper) depends on this PR. Per ai/PR.md, a dependent PR needs a decision on structure: (a) push when-tag and the follow-up branch to this repo and open a real stack, (b) open the follow-up as a draft against master with this PR's commits in its diff, or (c) wait for this PR to merge.

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 16s —— View job


Review of PR #55: fire the event trigger for DROP SCHEMA and DROP OWNED

I read the full diff: the install and update SQL, README/HISTORY, and the three new tests plus the helper. I did not build the extension or run the tests. The code-review skill failed to run, so this is a manual review.

I found no bugs.

  • Install and update paths match. Both use the same function body and the same WHEN tag IN ('DROP EXTENSION', 'DROP SCHEMA', 'DROP OWNED'). The update script drops and recreates the trigger, which is needed because ALTER EVENT TRIGGER can't change WHEN.
  • Early return. The function returns before it reads extension_drop__commands or runs the sanity assert, unless pg_event_trigger_dropped_objects() contains an extension row. Non-superuser and stale-row cases are covered by unrelated_drops.sql.
  • record variable. It keeps the function from needing the table type before the early return.
  • Docs. extension_drop__repair() in HISTORY exists (sql/extension_drop.sql:159). The README and HISTORY text match the behavior.

Minor notes (no action required)

  • The PR description is accurate now. The earlier "function unchanged" wording is gone.
  • The tests create a SUPERUSER role and a plain role, and they grant CREATE ON DATABASE. These are safe only if the test transaction is rolled back, so I'd keep it that way. I didn't check test/finish.sql.
  • DROP OWNED BY for a role that owns other objects still relies on the registered SQL running while those objects exist. That is the same ordering as DROP EXTENSION, so it is fine.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 18s —— View job


Review of PR #55: fire the event trigger for DROP SCHEMA and DROP OWNED

I read the diff of the install SQL, the 0.1.1→stable update script, and unrelated_drops.sql with the test helper. I did not build the extension or run the tests. The code-review skill failed to run, so this is a manual review.

I found no bugs.

  • Install and update paths agree. Both define the same function body and the same WHEN tag IN ('DROP EXTENSION', 'DROP SCHEMA', 'DROP OWNED'). The update script drops and recreates the trigger, which it has to do because ALTER EVENT TRIGGER can't change WHEN.
  • Early return. The function exits before it reads extension_drop__commands or runs the sanity assert, unless an extension row is among the dropped objects. Because r is now a record, the function body doesn't need the table type, so it compiles for a role with no access to that table.
  • Tests. unrelated_drops.sql covers a non-superuser DROP SCHEMA ... CASCADE and DROP OWNED BY. It also covers a superuser DROP SCHEMA while a stale row exists. The test helper checks the table is empty and that extension_drop__sanity_check() returns nothing.

Minor notes (no action required)

  • The tests create a plain role, a SUPERUSER role, and a GRANT CREATE ON DATABASE. They leave these behind, so they are safe only if the test transaction rolls back. I didn't check test/finish.sql.
  • On the open decisions in the earlier comment:
    1. I'd document the known limits: a disabled event trigger, session_replication_role = replica, and dropping the schema or extension that holds extension_drop itself.
    2. A RAISE WARNING on update when extension_drop__sanity_check() is non-empty is cheap and doesn't discard cleanup SQL. I'd skip auto-repair, as you suggested.
    3. For structure, (c) waiting for this PR to merge avoids duplicated diffs. Choose (a) if the follow-up needs to proceed in parallel.

Comment thread sql/extension_drop.sql Outdated
, $body$
DECLARE
r extension_drop__commands;
r record; -- Not extension_drop__commands: the type must not resolve before the early return

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to actually explain why that matters.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude here. Fixed in 0cae837: the comment now says why. A typed variable is resolved when plpgsql compiles the function on first call, before the early return, so a role that cannot see the extension's schema fails every unrelated DROP with type "extension_drop__commands" does not exist. Reverting to the typed variable makes the unrelated_drops non-superuser DROP SCHEMA CASCADE and DROP OWNED BY tests fail; with record they pass. Same wording applied to sql/extension_drop--0.1.1--stable.sql.

A typed variable is resolved when the function compiles, before the early return, so a role without access to the extension's schema fails unrelated drops.
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 11s —— View job


Review of PR #55

The code-review skill failed to run, so this is a manual check. I only looked at the current head of sql/extension_drop.sql. I did not build the extension or run the tests.

No new bugs found.

jnasbyupgrade's review comment said the r record note needed to explain why it matters. The head already has that explanation (sql/extension_drop.sql:268-271). The comment says a typed variable is resolved when the function compiles, before the early return. A role without access to the extension's schema would then fail every unrelated DROP. That is the reason the comment needed to give, so I made no further change.

The early return, the record variable and the FOR r IN SELECT c.* loop are consistent with each other.

…om unrelated_drops

The non-superuser role now owns schemas created via CREATE SCHEMA ...
AUTHORIZATION, so it needs no CREATE privilege on the database.
Comment thread test/sql/unrelated_drops.sql Outdated
SELECT plan(
0

+ 1 -- Create non-superuser role

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets consolidate these some... we definitely don't need a +1 for each line. Apply to the rest of the new test files as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude here. Consolidated in 823be14: unrelated_drops.sql plan() is now 4 lines (was 8), and drop_owned.sql and drop_schema_cascade.sql are 5 lines each, grouped by purpose. The totals in those two are unchanged.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude here. 50bf9be consolidates the plan() terms in drop_owned, drop_schema_cascade and unrelated_drops into one labelled line per group, and each helper's count now has its own line labelled with the helper's path; totals are unchanged.

Comment thread test/sql/unrelated_drops.sql Outdated
, 'Create non-superuser role'
);
SELECT lives_ok(
format('GRANT CREATE ON DATABASE %I TO extension_drop_test_plain', current_database())

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh... can't you just do this when creating the role?

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 14s —— View job


Review of PR #55

The code-review skill failed to run, so this is a manual check of the current head (823be14). I read sql/extension_drop.sql and test/sql/unrelated_drops.sql. I did not build the extension or run the tests. I did not read the other new test files, so I can't confirm the plan consolidation was applied to them.

I found no bugs.

  • Early return. The function returns before it touches extension_drop__commands or runs the sanity assert, unless an extension row is among the dropped objects. The r record comment now explains why a typed variable would break unrelated drops.
  • unrelated_drops.sql after the latest review comments. The plan is consolidated into three groups. The schemas are created AUTHORIZATION extension_drop_test_plain by the superuser, so the database CREATE grant is gone. This addresses both comments on that file.

Minor notes (no action required)

  • If the DO block in the non-superuser tests fails midway, it leaves the role without resetting it. The test already fails in that case, so this doesn't matter.
  • The tests create a role and a schema without cleaning them up, so they are safe only if test/finish.sql rolls back the transaction. I didn't check that.

Group the per-file assertion counts into a single term and label the
helper terms with the helper's path. Totals are unchanged.
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 12s —— View job


Review of PR #55

The code-review skill failed to run, so this is a manual check of the current head (50bf9be). I read sql/extension_drop.sql and test/sql/unrelated_drops.sql. I did not build the extension or run the tests. origin/master shares no merge base with this checkout, so I could not diff against it. I did not read the other test files.

I found no bugs.

  • Early return. The function returns before it touches extension_drop__commands or runs the sanity assert, unless an extension row is among the dropped objects. The r record block comment explains why a typed variable would break unrelated drops.
  • unrelated_drops.sql plan count. The plan is 3 (non-superuser drops) + 3 (stale registration) + 1 (test/finish.sql) = 7. That matches the seven assertions in the file.

Minor notes (no action required)

  • The tests create a role and schemas without cleaning them up. They are safe only if test/finish.sql rolls back the transaction. I didn't check that.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 11s —— View job


Review of PR #55

The code-review skill failed to run, so this is a manual check of the current head. I read the install and update SQL and test/sql/drop_owned.sql with its helper. I did not build the extension or run the tests.

I found no bugs.

  • Install and update paths match. Both define the same function body and the same WHEN tag IN ('DROP EXTENSION', 'DROP SCHEMA', 'DROP OWNED'). The update script drops and recreates the trigger, which it must do because ALTER EVENT TRIGGER can't change WHEN.
  • Early return. The function returns before it reads extension_drop__commands or runs the sanity assert, unless an extension row is among the dropped objects. The r record comment explains why a typed variable would break unrelated drops.
  • drop_owned.sql plan. The terms add up to 1 + 4 + 3 + 4 + 1 = 13.

Minor notes (no action required)

  • The tests create roles, including a SUPERUSER role, and don't drop them. They are safe only if test/finish.sql rolls back the transaction. I didn't check that.

…ommands

A role that drops an extension (via DROP EXTENSION, DROP SCHEMA ... CASCADE
or DROP OWNED) without access to extension_drop__commands got a bare
"permission denied for table". The trigger now checks USAGE on the table's
schema plus SELECT and DELETE on the table, after the early return for drops
that involve no extension, and raises insufficient_privilege with a DETAIL
naming the table and a HINT naming its owner and the grants that would fix
it.

The table is located through pg_extension and pg_class rather than by name,
since name lookup skips a schema the caller can't use. The function stays
SECURITY INVOKER: SECURITY DEFINER would run registered SQL as the owner.
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 11s —— View job


Review of PR #55

The code-review skill failed to run, so this is a manual check of the current head. I read the test/sql/drop_denied.sql header, plan and first half, and the test_ext__verify_dropped.sql helper. I did not build the extension or run the tests. I did not re-read the other files.

I found no bugs.

  • drop_denied.sql plan. The terms add up to 20 (2+1+3+2+2+1+2+4+2+1). The first-half assertions I read match the labelled groups, so I found no mismatch there. I did not read the second half.
  • DETAIL/HINT checks. The test captures the stacked diagnostics in GUCs and compares them against the expected text built from extension_drop_schema, so it doesn't hard-code the random schema name.
  • Helper. test_ext__verify_dropped.sql checks the extension is gone, the registration table is empty and extension_drop__sanity_check() returns nothing.

Minor notes (no action required)

  • The tests create roles, including one that was a superuser, and don't drop them. They are safe only if test/finish.sql rolls back the transaction. I didn't check that.

The event trigger now reads and deletes the dropped extensions' registrations
in one statement wrapped in an exception block for insufficient_privilege and
undefined_table (a caller without USAGE on the schema gets "does not exist").
Registered SQL runs afterward, outside the block, so a privilege error from it
is never mistaken for extension_drop's own. The handler raises the same
actionable insufficient_privilege error, with the original message added to the
DETAIL; the table owner and name for the HINT are looked up there, through
pg_extension and pg_class, since the caller may lack USAGE.

drop_denied now also covers SELECT without DELETE, a fully granted role
dropping successfully, and a privilege error from registered SQL surfacing
unchanged.
drop_denied now applies the grants the HINT names (directly, and through a
group role) and checks the drop succeeds. HISTORY.asc and README.md no longer
describe DROP EXTENSION as newly restricted, describe the trigger's current
order (registration removed, then registered SQL run), and note that the
registered SQL runs as the caller and may need further privileges.
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 20s —— View job


Review of PR #55

The code-review skill failed to run, so this is a manual check of the current head (fc01223). I read the trigger function in sql/extension_drop.sql and all of test/sql/drop_denied.sql. I compared the plan count against test/expected/drop_denied.out. I did not build the extension or run the tests.

I found no bugs.

  • Early return. The function returns before it touches extension_drop__commands or runs the sanity assert, unless an extension row is among the dropped objects. The record comment explains why a typed variable would break unrelated drops.
  • Exception block. The block wraps only the DELETE ... RETURNING statement, so errors from the registered SQL surface unchanged. The HINT lookup goes through pg_extension and pg_class by OID rather than by name. The bare RAISE when that lookup finds nothing re-raises the original error.
  • drop_denied.sql plan. The terms add up to 34 (2+1+3+2+2+2+1+2+1+2+2+3+1+3+4+2+1). The expected output has 34 ok lines, so the plan and the assertions agree.
  • Second half of drop_denied.sql. The cases are SELECT without DELETE, a privilege error from registered SQL passing through, the HINT's grants letting the drop succeed, a group role holding the grants, and a demoted owner. Each one tests what its label says.

Minor notes (no action required)

  • The tests create roles, including one that was a superuser, and don't drop them. They are safe only if the test transaction rolls back. The expected output ends with TRANSACTION INTENTIONALLY LEFT OPEN!, which suggests it does, but I didn't read test/finish.sql.

…mmands

Add a SECURITY DEFINER extension_drop__registered(name[]) that the event
trigger uses to find which dropped extensions are registered. Only those
go through the trapped DELETE as the caller.
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 13s —— View job


Review of PR #55

The code-review skill failed to run, so this is a manual check of the current head (d5906b7). I read the trigger function and the new extension_drop__registered() helper in sql/extension_drop.sql. I did not build the extension or run the tests. I did not re-read the update script or the test files for this commit.

I found no bugs in the code I read.

  • Early return. The function still returns before it touches extension_drop__commands, unless an extension row is among the dropped objects.
  • New helper. extension_drop__registered() is SECURITY DEFINER and read-only. It pins its path with pg_temp last, so a caller's temp table can't shadow the real table. It never runs registered SQL, so the registered SQL still runs as the caller.
  • Error handling around it. The trigger catches undefined_function and insufficient_privilege, so a caller without USAGE on the schema falls through to the DELETE, which raises the actionable 42501 error. An empty result returns early, so unregistered extensions drop for callers without table access.

Notes

  • PR description is out of date. It says the function "stays SECURITY INVOKER" and that every drop needs table access "whether or not the extension is registered". Since d5906b7 an unregistered extension needs no table access, and the new SECURITY DEFINER helper is not mentioned. Please update the description, and the README and HISTORY if they say the same.
  • Helper is granted to public. Any role can call extension_drop__registered(names) and learn which extensions are registered. That is probably harmless, but the README could say so.
  • Sanity assert from the helper. When nothing is registered, the helper runs extension_drop__sanity_assert(). A stale row therefore still makes an unrelated extension drop raise XD001. This is the same as before for DROP EXTENSION, and it's intended, but it is worth a line in the docs.

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 21s —— View job


Review of PR #55 (head 931c5a3)

The code-review skill failed to run again, so this is a limited manual check. I did not build the extension or run any tests. I looked at the plan counts in test/sql/drop_denied.sql and test/sql/sanity_assert_overload.sql. I did not re-read the SQL scripts or the other suites for this head.

I found no bugs in what I checked.

  • Consolidation. test/sql/ now holds five suites: dependency_guard, drop_denied, public_usage, sanity_assert_overload and simple. drop_multiple, drop_owned, drop_schema_cascade, registered_sql_search_path and unrelated_drops are folded into simple and drop_denied. That covers the "does this need its own suite" comments.
  • drop_denied.sql plan. The terms add up to 61 (4+8+5+4+5+6+6+12+10+1). test/expected/drop_denied.out has 1..61 and 61 ok lines, so they agree.
  • sanity_assert_overload.sql. It stays separate, and the header comment says why: plpgsql caches resolved plans per session, so every caller must first run after the overload is planted. Folding it into another suite would hide a missing NULL::name.
  • Plan style. Both plans are now one labelled line per group, which answers the "too many +1s" comment.

Notes (nothing here was run)

  • CLAUDE.md is modified in the CI workspace. git status shows an uncommitted change that is not part of this PR's diff. I left it alone. Please check that the committed CLAUDE.md is the intended text.
  • Verification. The head commit changes tests only. Please re-run make test, make test-update and bin/test_existing on 931c5a3. The real pg_upgrade leg still needs a CI run.

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 14s —— View job


Review of PR #55 (head e0ee977)

The code-review skill failed to run again, so this is a limited manual check. I did not build the extension or run any tests.

I found no new bugs. The head commits change tests only. The earlier verification of sql/ still applies.

Checks I made:

  • grep finds no ORDER BY in either SQL script, as the description says.
  • test/sql/ holds five suites: dependency_guard, drop_denied, public_usage, sanity_assert_overload, simple. Each has one .out, and no _1.out files remain.

Notes

  • CLAUDE.md is modified in the CI workspace. The uncommitted change restores the older wording (SET search_path FROM CURRENT, no @extension_schema@, no pinned registered-SQL path, no single finish.sql assertion). That contradicts the code on this PR. It is not part of the PR diff, so I left it alone. Please check that the committed CLAUDE.md is the intended text.
  • The real pg_upgrade leg still needs a CI run.

@jnasbyupgrade

jnasbyupgrade commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Claude here. Suite layout after 931c5a3, in answer to the review of all new suites.

Rule applied: a scenario shares a suite with whatever already does similar setup, unless it needs something the shared file can't give it.

Folded into simple.sql (same setup: register, create, drop, savepoint-isolated): drop_owned, drop_schema_cascade, drop_multiple, registered_sql_search_path.
Folded into drop_denied.sql (same non-superuser role and registration fixtures): sanity_error, unrelated_drops.

Kept as separate files:

  • drop_denied: the non-superuser role, planted operators and privilege checks are fixtures simple doesn't have.
  • public_usage: it revokes PUBLIC's USAGE and drops and reinstalls extension_drop itself. This is a reason, not something I verified: the file's transaction is rolled back, so a savepoint before the drop could let it share a session, but every later test would then run against a reinstall in a different schema and without the suite's fixtures, and the revoke scenarios are a different subject from the others.
  • sanity_assert_overload: plpgsql caches each function's resolved plan per session, so the zero-argument overload must be planted before any caller runs in that session; a shared file would have earlier tests run those callers first. Its setup (a role with CREATE, planting one function) is small; it could instead sit after the reinstall in public_usage if you'd prefer one fewer file, but I haven't tried that and haven't verified it would keep the plan-cache guarantee.
  • dependency_guard: not new in this PR.

Done (6420a17, 1eaa519, 9866690; the two helpers I had left pending):

  • pg_temp.xd_as(role, sql) in test/deps.sql replaces every SET LOCAL ROLE ... RESET ROLE DO block (12 sites across drop_denied, simple, public_usage, sanity_assert_overload): the same wrapper was repeated with only the role and statement changing.
  • The member-function pg_depend query is defined once in drop_denied and used for the proconfig check and the member-function assertion.
  • The raw prosecdef is_empty is deleted. One bag_eq over (proname, prosecdef) rows replaces it, the count, and the per-function is_definer/isnt_definer calls, so an added function, an overload (including of the claim function) or a definer flag change fails it; a by-name check missed the same-name overload case.

Decided against:

  • Merging sanity_assert_overload into another file: the plan-cache reason above still holds.
  • Dropping either the superuser (simple) or plain-role (drop_denied) DROP SCHEMA/DROP OWNED scenarios: they exercise different privilege paths.
  • Renaming drop_denied: the name still fits its main subject, and a rename churns the history for no gain.

pg_temp.xd_as(role, sql) replaces every SET LOCAL ROLE / RESET ROLE DO block.
drop_denied defines the member-function query once; the member-function
names are asserted with set_eq and SECURITY INVOKER is checked for every
member other than the claim function, so a member added later cannot skip
the check. The raw prosecdef query is gone.
pg_depend row order differs after binary pg_upgrade, which reordered the
output in existing mode.
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 15s —— View job


Review of PR #55 (head 1eaa519)

The code-review skill failed to run again, so this is a limited manual check. I did not build the extension or run any tests.

I found no bugs in what I checked.

  • Neither SQL script has an ORDER BY, as the description says.
  • test/sql/ holds five suites with one .out each: dependency_guard, drop_denied, public_usage, sanity_assert_overload, simple.
  • The head commit changes tests only (ordering the isnt_definer checks by name), so the earlier verification of sql/ still applies.

Notes

  • CLAUDE.md is modified in the CI workspace. git diff shows an uncommitted change (+8/-15) that is not part of the PR. I left it alone. Please check that the committed CLAUDE.md is the intended text.
  • Please re-run make test, make test-update and bin/test_existing on 1eaa519. The real pg_upgrade leg still needs a CI run.

… the redundant xd_as handler

bag_eq over (proname, prosecdef) catches an added overload or definer
function that a by-name check missed. Pass inner SQL literals through %L.
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 13s —— View job


Review of PR #55 (head 9866690)

The code-review skill failed to run again, so this is a limited manual check. I did not build the extension or run any tests.

I found no bugs in what I checked.

  • Neither SQL script has an ORDER BY, as the description says.
  • test/sql/ holds five suites with one .out each: dependency_guard, drop_denied, public_usage, sanity_assert_overload, simple.
  • The head commit changes tests only (isnt_definer for member functions, xd_as handler dropped), so the earlier verification of sql/ still applies. I did not read the test diff itself.

Notes

  • CLAUDE.md is modified in the CI workspace. git diff shows an uncommitted change (+8/-15) that is not part of the PR. I left it alone. Please check that the committed CLAUDE.md is the intended text.
  • Please re-run make test, make test-update and bin/test_existing on 9866690. The real pg_upgrade leg still needs a CI run.

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 17s —— View job


Review of PR #55 (head 007d795)

The code-review skill failed to run, so this is a limited manual check of the last three commits (tests only). I did not build the extension or run the tests.

I found no bugs.

  • drop_denied.sql plan. The terms add up to 51 (4+8+5+4+5+6+6+2+10+1). test/expected/drop_denied.out has 1..51 and 51 ok lines.
  • bag_eq on member functions. It matches (proname, prosecdef) rows, so an added function, an overload or a changed definer flag fails the test. It replaces the set_eq, is_definer and isnt_definer calls, and the new row-matching covers an overload of extension_drop__claim as well.
  • %L quoting in xd_as callers. The three call sites that build SQL (drop_denied, public_usage, sanity_assert_overload) now pass the inner statement through format(... %L). This quotes the schema name correctly for names like "xD s".
  • Dropped "session role reset" assertion. It removes the current_user = session_user check after the failing registered SQL. The ROLLBACK TO SAVEPOINT base that follows undoes a role left set by the error, so the check wasn't needed.

Notes

  • CLAUDE.md is modified in the CI workspace. git status shows an uncommitted change that is not part of the PR. I left it alone. Please check that the committed CLAUDE.md is the intended text.
  • The real pg_upgrade leg still needs a CI run.

Comment thread sql/extension_drop.sql Resolved
Comment thread sql/extension_drop.sql Outdated
FOR r IN SELECT * FROM @[email protected]_drop__claim() LOOP
RAISE DEBUG E'extension "%" is being dropped; executing SQL:\n%', r.extension_name, r.sql;
-- Reset to the pinned path: an earlier registration may have changed it (qualified so it can't be hijacked)
PERFORM pg_catalog.set_config('search_path', 'pg_catalog, pg_temp', true);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to do this we either need to set it back to what it was or ensure that we're in a savepoint/substrans (which AFAIK will mean it gets reset due to LOCAL). The way to ensure we're in a savepoint is to put an exception handler in the block.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude here. Done in 165516f: the trigger saves current_setting('search_path') before the loop and restores it with pg_catalog.set_config(..., true) after each EXECUTE r.sql; the pre-EXECUTE reset is gone.

A savepoint/exception handler isn't needed. I checked in a transaction: the function's own SET search_path clause already restores the caller's path on exit even after set_config(..., true) inside it, and an inner BEGIN ... EXCEPTION block that completes does not undo a set_config made inside it (on the error path the transaction aborts anyway). So the per-iteration restore only stops one registration's path leaking into the next.

Comment thread test/sql/drop_denied.sql Outdated
-- Hide version-specific NOTICE/WARNING text from the drops
SET client_min_messages = ERROR;

\set DROP_SCHEMA 'SELECT pg_temp.xd_as(''extension_drop_test_plain'', ''DROP SCHEMA extension_drop_test_plain_schema CASCADE'')'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The psql variable thing is starting to get out of hand. Is there a way to consolidate some of this or reduce overall verbosity? (IE, would creating a temp function for unregister that returns tap output reduce total script line count?)

Also, are these tests in optimal order? And do we really need all of them?

@jnasbyupgrade jnasbyupgrade Nov 4, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude here. Consolidated in 165516f. drop_denied.sql went from 356 to 264 lines and from 51 to 33 tests; psql variables from 13 (DROP_SCHEMA, DROP_OWNED, DROP_EXTENSION, MEMBER_FUNCS, RECREATE, UNREGISTER, CAPTURE_XD001, SANITY_ASSERT, RECORD_ROLE, NEEDS_CREATEROLE, INSERT_STALE, PLANT, GRANT_CREATE) to 3 (REGISTER_RECORDER, SANITY_ASSERT, plant).

A temp function pg_temp.xd_scenario(...) now does "optionally unregister / insert a stale row / run setup, run the drop as a role, check the outcome" and returns TAP; it rolls back its own work, so scenarios need no savepoints. xd_members is a temp view replacing MEMBER_FUNCS.

Cut or merged, and why it's safe:

  • Setup (create role/schema, register SQL, demote role, insert stale row, remove stale row, the plant step, drop the extension) is now plain statements; a failure still shows in the regression output.
  • Registered scenarios: "lives / ran as / registration removed" is one helper call (the last two merged into one assertion). Temp-table scenario: 3 assertions to 2 (lives, effects).
  • Claim outside the trigger: the superuser variant is gone, the plain-role one stays (the superuser path adds no privilege-sensitive coverage; the error is raised before any privilege matters) plus the still-registered check.
  • The two planted-operator scenarios share one plant step; "hijacked = no" is folded into the helper's effects assertion.
  • One behaviour change: the plain-role no-extension drops now run with a stale row present (it's inserted once for the group), which is a superset of the old no-stale check.
  • Nothing dropped: all three commands registered and unregistered, ran-as, the registered SQL's privilege error, XD001 with/without registration plus message/DETAIL/HINT equality and the plural DETAIL, no-extension drops, claim outside the trigger, temp-table shadowing, the member-function list and pinned search_path, and the planted-operator checks on the claim path, the claim-with-stale-row path and the invoker path.
  • Mutation check: removing SECURITY DEFINER from claim, making claim delete nothing, and removing its sanity_assert each turn drop_denied red.

Order: yes, reordered. Scenarios are grouped by state: all drops that need the extension in the plain role's schema first (savepoint only for the XD001-text and planted-operator groups that need shared setup), then the member-function checks, then the DROP EXTENSION owner scenarios, then the no-extension drops last (the extension has to be gone). That removes the "drop the schema, recreate" churn and nearly all savepoint rollbacks.

…d tests

The event trigger restores the search_path it entered with after each
registration instead of resetting it before. drop_denied.sql runs its
scenarios through one temp function that returns TAP output.
Comment thread test/sql/drop_denied.sql Outdated
-- Registered SQL runs as the dropping role and the registration is removed; unregistered drops just work
SELECT * FROM pg_temp.xd_scenario('Registered: DROP SCHEMA CASCADE with no table privileges'
, 'extension_drop_test_plain', 'DROP SCHEMA extension_drop_test_plain_schema CASCADE'
, ran_as => 'extension_drop_test_plain');

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multi-line need to have ; on their own line. Update all modified/new lines in PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Or they can end with something like ); in cases where that makes more sense; the point is to make it clearer where a new statement starts)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude here. Done in f0b1d58: the terminator of every multi-line statement this PR adds or modifies is now on its own line (or on a closing ); line). Updated: test/sql/drop_denied.sql, test/sql/simple.sql, sql/extension_drop.sql and sql/extension_drop--0.1.1--stable.sql (same changes in both). Layout only; the token stream is unchanged.

I left dollar-quote closers such as END $f$; and $$; as they are (treated like the ); case) and did not touch SQL inside string literals or psql meta-commands. Say if you want the END $f$;-style closers changed too.

…oc nits

Close the multi-line HINT literal with `$$` and put `;` on its own line
in both sql/extension_drop.sql and the 0.1.1--stable update script.
CLAUDE.md: the search_path is restored after each registration, not
reset before. README: name the heading instead of "section 1".
@jnasbyupgrade
jnasbyupgrade marked this pull request as ready for review November 5, 2026 17:04
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 13s —— View job


Review of PR #55 (head 5d440df)

The code-review skill failed to run again, so this is a limited manual check. I did not build the extension or run any tests. I did not re-read the tests or the update script.

I found no bugs in what I checked.

  • Neither SQL script has an ORDER BY, as the description says.
  • sql/extension_drop.sql has one SECURITY DEFINER function, the dropping function (:334). The two sanity functions carry the definer warning comments (:159, :188).
  • 5d440df is an empty commit, so the verification at d3d6e18 and the CI run on this head still apply.

Notes

  • CLAUDE.md is modified in the CI workspace. git status shows an uncommitted change that is not part of the PR. I left it alone. Please check that the committed CLAUDE.md is the intended text.
  • The real pg_upgrade legs are CI-only. The description says they passed on this head.

@jnasbyupgrade
jnasbyupgrade merged commit 07dcc0d into Postgres-Extensions:master Nov 5, 2026
22 checks passed
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