Thread: [JDBC] [pgjdbc/pgjdbc] 2958cc: fix: function calls without parameters do notrequ...
[JDBC] [pgjdbc/pgjdbc] 2958cc: fix: function calls without parameters do notrequ...
From
Robert Zenz
Date:
Branch: refs/heads/master Home: https://github.com/pgjdbc/pgjdbc Commit: 2958cc22a6a00609bfbb6eb17d4e401dfe433123 https://github.com/pgjdbc/pgjdbc/commit/2958cc22a6a00609bfbb6eb17d4e401dfe433123 Author: Robert Zenz <robert.zenz@sibvisions.com> Date: 2017-04-16 (Sun, 16 Apr 2017) Changed paths: M pgjdbc/src/main/java/org/postgresql/core/Parser.java M pgjdbc/src/test/java/org/postgresql/test/jdbc3/Jdbc3CallableStatementTest.java Log Message: ----------- fix: function calls without parameters do not require parentheses According to the JDBC documentation, the parentheses surrounding the parameters, of a function call, are optional if there are no parameters. However, Parser required the parentheses to be present at all times. The new behavior is that the Parser checks whether there are parentheses, and if not simply adds them. Also, tests have been added for both cases, function calls to functions with no parameters with and without parentheses. This allows to execute function calls like this: {?= call somefunction } Which is line with the JDBC documentation. The tracking bug is #767.