Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-23.2: sql: allow dropping routines with UDT-typed parameters #115904

Merged
merged 1 commit into from Dec 11, 2023

Commits on Dec 8, 2023

  1. sql: allow dropping routines with UDT-typed parameters

    Previously, it was not possible to specify UDT parameters when dropping
    a routine. This is because of an oversight in `MatchAtIdentical`, which
    was likely copied from `MatchAt`. Specifically, `MatchAt` has special
    handling for tuple types that take advantage of the fact that
    `types.Equivalent` allows `types.AnyTuple` to match with any other tuple.
    `MatchAtIdentical, on the other hand, uses `types.Identical`, which does
    not make the same allowance. This meant that overload resolution would
    always fail for UDT parameters in code paths that use `MatchAtIdentical`,
    such as DROP FUNCTION.
    
    This patch removes the replacement logic for tuple types in `MatchAtIdentical`,
    so that `types.Identical` is always called with the original type. This allows
    statements like the following to succeed:
    ```
    DROP PROCEDURE foo(x udt);
    ```
    
    Fixes #114677
    
    Release note (bug fix): Fixed a bug existing since v23.1 that prevented
    naming UDT parameters when dropping a user-defined function (or procedure).
    DrewKimball committed Dec 8, 2023
    Configuration menu
    Copy the full SHA
    b2915dd View commit details
    Browse the repository at this point in the history