[pgjdbc/pgjdbc] d75591: feat: add new "escapeSyntaxCallMode" connection pr...
GregN <[email protected]> Tue, 26 Nov 2019 04:21:53 -0800
| Newsgroups | gmane.comp.db.postgresql.jdbc |
|---|---|
| Message-ID | <pgjdbc/pgjdbc/push/refs/heads/master/[email protected]> |
Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: d75591385538cd704a066c4ed026f767ce3784ab
https://github.com/pgjdbc/pgjdbc/commit/d75591385538cd704a066c4ed026f767ce3784ab
Author: GregN <[email protected]>
Date: 2019-11-26 (Tue, 26 Nov 2019)
Changed paths:
M README.md
M docs/documentation/head/connect.md
M pgjdbc/src/main/java/org/postgresql/PGProperty.java
M pgjdbc/src/main/java/org/postgresql/core/CachedQueryCreateAction.java
M pgjdbc/src/main/java/org/postgresql/core/JdbcCallParseInfo.java
M pgjdbc/src/main/java/org/postgresql/core/Parser.java
M pgjdbc/src/main/java/org/postgresql/core/QueryExecutor.java
M pgjdbc/src/main/java/org/postgresql/core/QueryExecutorBase.java
M pgjdbc/src/main/java/org/postgresql/ds/common/BaseDataSource.java
A pgjdbc/src/main/java/org/postgresql/jdbc/EscapeSyntaxCallMode.java
M pgjdbc/src/test/java/org/postgresql/core/ParserTest.java
A pgjdbc/src/test/java/org/postgresql/test/jdbc3/EscapeSyntaxCallModeBaseTest.java
A pgjdbc/src/test/java/org/postgresql/test/jdbc3/EscapeSyntaxCallModeCallIfNoReturnTest.java
A pgjdbc/src/test/java/org/postgresql/test/jdbc3/EscapeSyntaxCallModeCallTest.java
A pgjdbc/src/test/java/org/postgresql/test/jdbc3/EscapeSyntaxCallModeSelectTest.java
M pgjdbc/src/test/java/org/postgresql/test/jdbc3/Jdbc3TestSuite.java
Log Message:
-----------
feat: add new "escapeSyntaxCallMode" connection property (#1560)
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