X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 2CCC711F6008 for ; Fri, 28 Apr 2006 09:00:42 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 48237-05 for ; Fri, 28 Apr 2006 09:00:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 96BC811F600C for ; Fri, 28 Apr 2006 09:00:19 -0300 (ADT) Received: (qmail 8017 invoked from network); 28 Apr 2006 12:00:19 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 28 Apr 2006 12:00:19 -0000 In-Reply-To: References: <3f205b320604201502o112f68abhafbc0a2e0a845218@mail.gmail.com> <3f205b320604201703x2d5a52c7s214a039e36539a8a@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v749.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <761B0D82-3920-4314-BA08-C7B41D05BF00@fastcrypt.com> Cc: List , Luis Londono Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: Bug with callable statement and output parameters Date: Fri, 28 Apr 2006 08:00:14 -0400 To: Kris Jurka X-Mailer: Apple Mail (2.749.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/186 X-Sequence-Number: 15120 On 27-Apr-06, at 10:15 PM, Kris Jurka wrote: > > > On Thu, 27 Apr 2006, Dave Cramer wrote: > >> Patch attached for review and test >> > > This patch does not handle the situation where the number of > registered parameters does not match the number of returned > parameters as the attached tests show. Thanks, I'll add this test. > > Also the regression tests you sent me separately are no good. They > do not pass because they mix creating and destroying the test > function in the test method and the tearDown method. This should > go into setUp and tearDown. Also you can't call executeQuery on a > CallableStatement because it will complain with "No results were > returned by the query." Sorry, I originally had them there but setUp and tearDown get called for every test, so I moved them, and didn't remove them in teardown. > > The whole Jdbc3CallableStatementTest sucks. It should have all of > its function/table creation destruction moved into setUp/tearDown. > Also the coding: So we're OK with adding, and removing the functions for every test ? > > try { > // something > } catch(Exception e) { > fail(e.getMessage(); > } > > Is a waste of code. Not only does it not do anything, but it also > obscures the source of the exception. > > Kris Jurka >