Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 6CAA89FB655 for ; Thu, 1 Mar 2007 20:09:22 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 50659-06 for ; Thu, 1 Mar 2007 20:09:15 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 3AA3C9FB652 for ; Thu, 1 Mar 2007 20:09:19 -0400 (AST) Received: (qmail 21470 invoked from network); 2 Mar 2007 00:09:18 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.14?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 2 Mar 2007 00:09:18 -0000 In-Reply-To: <23779.1172793964@sss.pgh.pa.us> References: <40939ed60703010604j149caad2n92dccac2ae6f6824@mail.gmail.com> <3AC75FD4-F9DC-4B9E-AA60-38F67EFD39B0@redhat.com> <0DC8A2E6-BB3C-4592-BF9E-7EECA0CCE37B@fastcrypt.com> <23779.1172793964@sss.pgh.pa.us> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: pgsql-jdbc@postgresql.org Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)? Date: Thu, 1 Mar 2007 19:09:17 -0500 To: Tom Lane X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/8 X-Sequence-Number: 16722 On 1-Mar-07, at 7:06 PM, Tom Lane wrote: > Dave Cramer writes: >> The reason that setNull is required is because the type information >> is required. NULL by it self has no type information. The jdbc driver >> binds values to a prepared statement and the type information is >> required. So setNull( n, typeinfo) is required to bind the correct >> type. > > At least in this particular case, leaving the parameter type as > UNKNOWN > would have worked as the OP wishes. I dunno if that would break other > cases though. This means you have to leave all parameter types as UNKNOWN. What's the point of having parameter types at all ? Dave > regards, tom lane >