[JDBC] [pgjdbc/pgjdbc] 2958cc: fix: function calls without parameters do notrequ... - Mailing list pgsql-jdbc

From Robert Zenz
Subject [JDBC] [pgjdbc/pgjdbc] 2958cc: fix: function calls without parameters do notrequ...
Date
Msg-id 58f397879ce71_b123faac2bd1c24234016@hookshot-fe3-cp1-prd.iad.github.net.mail
Whole thread Raw
List pgsql-jdbc
  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.



pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: [JDBC] Driver performance improvements - kudos to the maintainersand the contributors
Next
From: Vladimir Sitnikov
Date:
Subject: [JDBC] [pgjdbc/pgjdbc] 28c984: fix: fix last block of stream being ignoredif siz...