Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czmlu-0003lx-Ck for pgsql-jdbc@arkaria.postgresql.org; Sun, 16 Apr 2017 16:11:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1czmlt-00023s-TY for pgsql-jdbc@arkaria.postgresql.org; Sun, 16 Apr 2017 16:11:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1czmlO-00018x-KJ for pgsql-jdbc@postgresql.org; Sun, 16 Apr 2017 16:10:58 +0000 Received: from m71-131.mailgun.net ([166.78.71.131]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1czmlH-0000ZL-2W for pgsql-jdbc@postgresql.org; Sun, 16 Apr 2017 16:10:57 +0000 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=github.com; q=dns/txt; s=mailo; t=1492359047; h=Content-Transfer-Encoding: Content-Type: Mime-Version: Subject: Message-ID: To: Reply-To: From: Date: Sender; bh=FpVsWCJTQKVrESAjQ41mEe4hzwdVZpVUBSoXNna0Gzw=; b=F94A6PFuQ0WEAVGc22M+NnnHKaHRiaMEKK3eFC5SJHiQhsNQ3JeSmZFzLRgcoSi9o4bIwQZj qXxlQZQcV9CMysdPOvkKAcv+GURHjlmu4Jr0Apc6bEuNKYR2ZEBKTHucg44p7h1u8cwZlzcY 7zNwxjyDxo77uPakQkcg29si64Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=github.com; s=mailo; q=dns; h=Sender: Date: From: Reply-To: To: Message-ID: Subject: Mime-Version: Content-Type: Content-Transfer-Encoding; b=XCcC7j8MBbfjfgsgjhH0q3VAIHyqD8bKWljuoj6TqknXQJAGr5SNe9nb5HxCZNwy+ZHnsz HenbpcGcjChjRPnCrhHyRM7cRBVkjzjB8YGmzyav5Nt9R1Td1uhf6dUyfYVXJ+UVAjoNnE/Z QBV+PqioYVP47mqRCcBdW5XKjpbuw= X-Mailgun-Sending-Ip: 166.78.71.131 X-Mailgun-Sid: WyI3ZTA2ZSIsICJwZ3NxbC1qZGJjQHBvc3RncmVzcWwub3JnIiwgIjQwZiJd Received: from github.com (Unknown [192.30.252.45]) by mxa.mailgun.org with ESMTP id 58f39787.7fdb76bfac90-smtp-out-n03; Sun, 16 Apr 2017 16:10:47 -0000 (UTC) Date: Sun, 16 Apr 2017 09:10:47 -0700 From: Robert Zenz Reply-To: Robert Zenz To: pgsql-jdbc@postgresql.org Message-ID: <58f397879ce71_b123faac2bd1c24234016@hookshot-fe3-cp1-prd.iad.github.net.mail> Subject: [pgjdbc/pgjdbc] 2958cc: fix: function calls without parameters do not requ... Mime-Version: 1.0 X-Pg-Spam-Score: -1.3 (-) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org Branch: refs/heads/master Home: https://github.com/pgjdbc/pgjdbc Commit: 2958cc22a6a00609bfbb6eb17d4e401dfe433123 https://github.com/pgjdbc/pgjdbc/commit/2958cc22a6a00609bfbb6eb17d4e401dfe433123 Author: Robert Zenz 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. -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc