Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yzp3m-0008JO-Px for pgsql-jdbc@arkaria.postgresql.org; Tue, 02 Jun 2015 16:29:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yzp3l-0005IJ-KX for pgsql-jdbc@arkaria.postgresql.org; Tue, 02 Jun 2015 16:29:01 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yzp3k-0005IC-LK for pgsql-jdbc@postgresql.org; Tue, 02 Jun 2015 16:29:00 +0000 Received: from rad0.itstriangle.com ([199.38.107.90]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Yzp3c-0007AW-6U for pgsql-jdbc@postgresql.org; Tue, 02 Jun 2015 16:28:57 +0000 Received: from itstriangle.com (localhost [127.0.0.1]) by rad0.itstriangle.com (8.14.4/8.14.4) with ESMTP id t52GShjU013981; Tue, 2 Jun 2015 12:28:44 -0400 Received: FROM [192.168.157.52] ([216.220.4.222]) BY itstriangle.com WITH ESMTP ; Tue, 2 Jun 2015 12:28:42 -0400 Message-ID: <556DDC6B.3010409@ttc-cmc.net> Date: Tue, 02 Jun 2015 10:40:11 -0600 From: dmp User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Firefox/24.0 SeaMonkey/2.21 MIME-Version: 1.0 To: Thomas Kellerer , PostgreSQL JDBC Subject: Re: Re: CallableStatement.getParameterMetaData() throws exception for valid {call ...} statement References: <556A1477.2050506@ttc-cmc.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) 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 Thomas Kellerer wrote: > dmp wrote on 30.05.2015 21:50: >> Seems to work fine, maybe I have it wrong? >> > ~ > ~ > ~ > interesting, your code indeed works. > > After playing around with it, the difference is that I call > getParameterMetaData() *before* calling registerOutParameter(). > > > So getParameterMetaData() seems to only work after all OUT parameters have been > registered (I also tried calling it after the first registerOutParameter() - > failed as well). > > So how can I retrieve the information about the parameters if I can't call > getParameterMetaData() before registering the parameters (which I try to detect > by calling that method).The JDBC JavaDocs do not mention such a restriction. > > > Thomas According to the Java 7 API it seems this interface is mainly associated with PreparedStatements and lucky to get any information from a CallableStatement. --------------- public interface ParameterMetaData extends Wrapper An object that can be used to get information about the types and properties for each parameter marker in a PreparedStatement object. For some queries and driver implementations, the data that would be returned by a ParameterMetaData object may not be available until the PreparedStatement has been executed. Some driver implementations may not be able to provide information about the types and properties for each parameter marker in a CallableStatement object. --------------- From the context of your question, it seems what you are looking for is the information about the function, parameters, etc. When I first looked at this I searched the database for the newly created sum_n_product() function to find information about it. It seemed to be abscured. Perhaps that information stored in the database is the answer to your question rather then this interface. danap. -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc