Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 264AA9F9DAF for ; Thu, 20 Sep 2007 14:35:22 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 36866-03 for ; Thu, 20 Sep 2007 14:35:01 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail63.csoft.net (leary.csoft.net [205.205.214.5]) by postgresql.org (Postfix) with SMTP id 95D719F9798 for ; Thu, 20 Sep 2007 14:35:03 -0300 (ADT) Received: (qmail 13454 invoked by uid 1112); 20 Sep 2007 17:35:02 -0000 Date: Thu, 20 Sep 2007 13:35:02 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Eric Faulhaber cc: pgsql-jdbc@postgresql.org Subject: Re: Batch INSERT failing with error 22P02 In-Reply-To: <46F29BBC.20400@goldencode.com> Message-ID: References: <46EEE4EF.80608@goldencode.com> <46EFF277.1090309@goldencode.com> <46F29BBC.20400@goldencode.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/104 X-Sequence-Number: 17526 On Thu, 20 Sep 2007, Eric Faulhaber wrote: > What in the log file is indicating the use of an unspecified type to you? > I'd like to investigate this further. Whenever you see a DescribeStatement message that means the parameters you've supplied for that row have at least one unresolved type. 21:29:08.469 (3) FE=> Describe(statement=S_19) The normal describe message is for describing a portal, meaning just the resultset info while a statement describe will return information on what parameter types the server side statement expects. > Many thanks for a deep look into the log file and for a detailed description > of what is going on. Your analysis has given me some great insight which has > led to a possible solution (see below). Nevertheless, I'd still be > interested to find out what triggered this change in behavior from version to > version given my use case. > OK, I've got two approaches to figure out what's going on: 1) More type logging information. This tries to figure our why we're sending DescribeStatement and shows all the type info that goes into that decision. It also logs the results of DescribeStatement and when there is a conflict the error now contains all the type info from before and after the conflict. 2) Where's the unspecified type coming from? I've put in a hack to the driver to throw an exception when the first unspecified type is set which should hopefully provide enough information to track it back to your application. Unspecified types are perfectly legal, so this isn't a real problem, but it may be informational. I've put up jar files and associated patches here: http://www.ejurka.com/pgsql/jars/ecf/ For the unspecified type, the stacktrace alone should be fine. For the logging information, please rerun with loglevel=2 and upload just the last 10k lines of the file. Kris Jurka