Report missing functions from is_definer() and is_strict() - #373
Open
golden-dragon-dev wants to merge 1 commit into
Open
Report missing functions from is_definer() and is_strict()#373golden-dragon-dev wants to merge 1 commit into
golden-dragon-dev wants to merge 1 commit into
Conversation
Those assertions used to fail with "(test result was NULL)" when the function was not there. Route the remaining overloads through _func_compare() so they name the missing function, same as is_aggregate() already does. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Fixes #356.
A few of the function-metadata assertions still called
ok()with a NULL when the function was not there, so you got(test result was NULL). The overloads that take a description already go through_func_compare(); these did not.This puts the remaining
is_definer(),isnt_definer(),is_strict(), andisnt_strict()overloads on that same path, so a missing function is reported asFunction … does not exist, the wayis_aggregate()already does.Tests added in
functapfor the missing-function cases.Test plan
make installcheck(functap in particular)SELECT is_definer('nonesuch');andSELECT is_strict('nonesuch');should name the missing function, not print(test result was NULL)