Skip to content

Report missing functions from is_definer() and is_strict() - #373

Open
golden-dragon-dev wants to merge 1 commit into
theory:mainfrom
golden-dragon-dev:fix/356-missing-function-message
Open

Report missing functions from is_definer() and is_strict()#373
golden-dragon-dev wants to merge 1 commit into
theory:mainfrom
golden-dragon-dev:fix/356-missing-function-message

Conversation

@golden-dragon-dev

Copy link
Copy Markdown

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(), and isnt_strict() overloads on that same path, so a missing function is reported as Function … does not exist, the way is_aggregate() already does.

Tests added in functap for the missing-function cases.

Test plan

  • make installcheck (functap in particular)
  • SELECT is_definer('nonesuch'); and SELECT is_strict('nonesuch'); should name the missing function, not print (test result was NULL)

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>
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.

Tests should throw a meaningful error for objects that don't exist

1 participant