Repository navigation
Schema-qualify hypopg_reset() and hypopg_get_indexdef() calls - #12
Closed
utkarash2991 wants to merge 2 commits into
Closed
utkarash2991 wants to merge 2 commits into
utkarash2991 wants to merge 2 commits into
Conversation
Both were called unqualified, so they fail with "function ... does not exist" whenever hypopg isn't on the caller's search_path (e.g. installed in a separate schema from where index_advisor runs). hypopg_create_index() and hypopg() were already qualified via the existing hypopg_schema_name lookup; these two just hadn't been. hypopg_get_indexdef() is called inside a dynamically-built SQL string, so it fails silently into index_advisor()'s own errors array rather than raising - it doesn't show up under plpgsql_check/static analysis, only at runtime. Ships as 0.2.1 with an upgrade script from 0.2.0.
|
Could we get something along the lines of this PR for |
This was referenced Oct 5, 2026
Contributor
Author
utkarash2991
deleted the
utkarashsingh/psqlext-1773-schema-qualify-hypopg-calls
branch
October 6, 2026 10:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two
hypopgcalls inindex_advisor()were unqualified instead of schema-qualified like the rest of the function:hypopg_reset()- fails withfunction hypopg_reset() does not existwheneverhypopgisn't on the caller'ssearch_path(e.g. installed into a separate schema from whereindex_advisoritself lives, which is how Supabase installs it).hypopg_get_indexdef(indexrelid)- same root cause, but called inside a dynamically-built SQL string (execute format(...)), so it fails silently intoindex_advisor()'s ownerrorsarray at runtime instead of raising. Found this one while writing the regression test belowShips as
0.2.1with anindex_advisor--0.2.0--0.2.1.sqlupgrade script, soALTER EXTENSION index_advisor UPDATEworks for existing installs.Tracked in https://linear.app/supabase/issue/PSQLEXT-1773