Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
fix: DatabaseMetaData.getFunctions should not limit the search to the search_path if the schema is provided #1633
Currently getFunctions adds pg_function_is_visible to the sql looking for functions in all cases. If the user provides a schema but it is not on the search path no functions will be found. This seems counter-intuitive.
With this PR if the user provides a schema then that schema will be searched. If the schema is empty or null then the search path will be searched for the function.
@@ Coverage Diff @@ ## master #1633 +/- ## ============================================ + Coverage 69.02% 69.06% +0.03% - Complexity 4068 4073 +5 ============================================ Files 181 181 Lines 16861 16863 +2 Branches 2760 2760 ============================================ + Hits 11638 11646 +8 + Misses 3947 3945 -2 + Partials 1276 1272 -4