Repository navigation
Backport #8873: Qualify and quote the support function in ALTER FUNCTION .. SUPPORT (release-13.2) - #8910
Merged
ibrahim halatci (ihalatci) merged 1 commit intoOct 21, 2026
Conversation
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## bp-8818-release-13.2 #8910 +/- ##
=======================================================
Coverage ? 29.15%
=======================================================
Files ? 289
Lines ? 64353
Branches ? 8066
=======================================================
Hits ? 18762
Misses ? 43398
Partials ? 2193 🚀 New features to boost your workflow:
|
ibrahim halatci (ihalatci)
force-pushed
the
bp-8873-release-13.2
branch
from
October 14, 2026 07:27
540027c to
0de4a65
Compare
ibrahim halatci (ihalatci)
changed the base branch from
release-13.2
to
bp-8818-release-13.2
October 14, 2026 07:35
…8873) DESCRIPTION: Fixes ALTER FUNCTION .. SUPPORT with a user-defined support function `ALTER FUNCTION f SUPPORT my_support` on a distributed function sends the support function name to the workers exactly as the user typed it. The workers run the command without the coordinator's `search_path`, so this only works when the support function is in `public` or `pg_catalog`. Here the support function exists on every node, in the same schema as `f`: ``` ALTER FUNCTION func_with_support_2(int, int) SUPPORT my_support; ERROR: function my_support(internal) does not exist CONTEXT: while executing command on localhost:57638 ``` A name that needs quoting also fails, because `AppendDefElemSupport` prints it with `defGetString`: ``` ALTER FUNCTION func_with_support(int, int) SUPPORT "Support Func"; ERROR: syntax error at or near "Func" ``` #5849 (for #5844) made the command valid by assuming the support function exists on the workers. This PR keeps that assumption and changes two things: - `QualifyAlterFunctionStmt` resolves the support function the same way postgres does (`LookupFuncName` with a single `internal` argument) and qualifies it with its schema. - The deparser prints the name with `NameListToQuotedString`. **Test.** I added cases to `function_propagation.sql` for an unqualified support function in the test schema and for a quoted support function name. They check `prosupport` on the workers. - On `main` @ c267b0b, both `ALTER`s fail as shown above and the workers keep `generate_series_int8_support`. - With the fix, the workers show `function_propagation_schema."Support Func", function_propagation_schema.my_support`. I ran this on PG 17.11 in Docker with `make check-custom-schedule` (minimal cluster setup + `function_propagation`). `uncrustify` with the citus-style config reports no changes. This PR was prepared with an AI coding agent (Claude) working for the breken-ai account. I reviewed the change and the test output. (cherry picked from commit bfb8600) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d89d1f43-18ea-4405-bd1b-5c3129e391a9
ibrahim halatci (ihalatci)
force-pushed
the
bp-8873-release-13.2
branch
from
October 21, 2026 09:10
0de4a65 to
707db91
Compare
ibrahim halatci (ihalatci)
merged commit Oct 21, 2026
4a0803c
into
release-13.2
352 of 453 checks passed
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.
Backports #8873 (commit bfb8600) to release-13.2.
Description
Qualify and quote the support function in \ALTER FUNCTION .. SUPPORT.
Validation
Tested locally on PostgreSQL 17 with regression test \unction_propagation.