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
New "escapeSyntaxCallMode" connection property #1560
New "escapeSyntaxCallMode" connection property #1560
Conversation
❌ Build pgjdbc 1.0.430 failed (commit 924c675d76 by @gregn123) |
Thanks for this. I think it would be useful to do an end to end test to test procedures. |
Thanks, I'm working on those additional updates (and some corrections for Javadoc). |
cd6f9cb
to
c3619c7
Compare
✅ Build pgjdbc 1.0.438 completed (commit 92b67323db by @gregn123) |
I may be wrong, but the failure reported in the Travis CI build doesn't seem to be related to the proposed changes in the PR (?). Could there be another reason for that failure? |
@gregn123 sorry this has taken so long can you fix the conflict and I will push this. |
26e051c
to
a3fbc95
Compare
The "escapeSyntaxCallMode" connection property allows you to specify how the driver transforms JDBC escape call syntax into underlying SQL, for invoking procedures and functions. The possible values of this property are: select, callIfNoReturn, or call In escapeSyntaxCallMode=select mode (the default), the driver always uses a SELECT statement (allowing function invocation only). In escapeSyntaxCallMode=callIfNoReturn mode, the driver uses a CALL statement (allowing procedure invocation) if there is no return parameter specified, otherwise the driver uses a SELECT statement. In escapeSyntaxCallMode=call mode, the driver always uses a CALL statement (allowing procedure invocation only). Prior to the addition of this connection property, the driver always used a SELECT statement for JDBC escape call syntax, which results in the following error when attempting to invoke a procedure: ERROR: xxxx is a procedure Hint: To call a procedure, use CALL
a3fbc95
to
e1f7aea
Compare
✅ Build pgjdbc 1.0.544 completed (commit dae3f59cd4 by @gregn123) |
The new "escapeSyntaxCallMode" connection property allows you to specify how the driver transforms JDBC escape call syntax into underlying SQL, for invoking stored procedures or functions. (backend >= 11).
The possible values of this property are: select, callIfNoReturn, or call
In escapeSyntaxCallMode=select mode (the default), the JDBC driver always uses a SELECT statement (allowing function invocation only).
In escapeSyntaxCallMode=callIfNoReturn mode, the JDBC driver uses a CALL statement (allowing procedure invocation) if there is no return parameter specified.
In escapeSyntaxCallMode=call mode, the JDBC driver always uses a CALL statement (allowing procedure invocation only).
Without the addition of this new connection property, PGJDBC will always use a SELECT statement for JDBC escape call syntax, which results in the following error if an attempt is made to invoke a procedure:
ERROR: xxxx is a procedure Hint: To call a procedure, use CALL