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
Fix metadata functions getProcedures() and getFunctions() to ignore search_path #2174
Conversation
Using try/catch in the tests will not allow me to backpatch this ... :( |
Force pushed to add the PR details to the change log as well. The main CI action only runs on the latest version of PG server. I have it running against the omni matrix with all the other server versions on my fork here: https://github.com/sehrope/pgjdbc/actions/runs/915786302. Locally it worked fine on all the versions I checked and looks like it's 2/3 done clearing the full matrix. |
Which branch are you going to back patch into? I thought we had already completely dropped everything less than JDK 8. |
42.2.21 is still what folks are using until we release 42.3.0 which 1) won't be stable and 2) doesn't seem to be imminent |
Dang. I really thought we were done with those ancient JDKs. My fault for trying to improve the tests ;-) The fix itself applies clean but the test won't work on the old JDK and without a change won't pass either as they expect search path changes to be reflected. Speaking of which, how do we test this anyway? None of Actions or Travis CI runs those old JDKs and I don't have either 6 or 7 installed right now either. If you think it's worthwhile to backpatch this I can get it running and "ancient-ize" the tests so it applies uniformly. IIRC, with the gradle changes we'd have to build on 8+ targeting 1.6 as gradle itself won't run on there either. |
…rch_path visibility Previously if no schema pattern was specified then a default filter was added to getFunctions() and getProcedures() to restrict the returned set to only those that are visible to the user via search_path. This removes that filter so that calling either function with a null or empty schema pattern will return all functions or procedures.
…ms not in search path
eb2cf4c
to
0115560
Compare
All Submissions:
New Feature Submissions:
./gradlew autostyleCheck checkstyleAll
pass ?Changes to Existing Features:
Closes #2173. See also discussion on #1633.
This PR changes those two metadata functions to ignore the search_path. Previously without a schema pattern they restricted the results to the active search path.
The rest of the changes update the tests to reflect that behavior and subsequently clean up and improve them a bit. The last commit adds some more detail to the getProcedures() test to validate the result set columns similar to how were were already validation the result set of getFunctions().