Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 45F86632CFC for ; Wed, 4 Mar 2009 03:46:59 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 36051-10 for ; Wed, 4 Mar 2009 03:46:54 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mail.postgresql.org (Postfix) with ESMTP id 9DD0B63267D for ; Wed, 4 Mar 2009 03:46:53 -0400 (AST) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LeloZ-00028O-RD for pgsql-jdbc@postgresql.org; Wed, 04 Mar 2009 07:46:51 +0000 Received: from 217.110.94.67 ([217.110.94.67]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Mar 2009 07:46:51 +0000 Received: from spam_eater by 217.110.94.67 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Mar 2009 07:46:51 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: Thomas Kellerer Subject: Re: Inserting into a uuid column Date: Wed, 04 Mar 2009 08:46:40 +0100 Lines: 21 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 217.110.94.67 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.6.666 In-Reply-To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.599 tagged_above=0 required=5 tests=RCVD_IN_DNSWL_LOW=-1, RCVD_NUMERIC_HELO=2.599 X-Spam-Level: * X-Archive-Number: 200903/15 X-Sequence-Number: 19345 Hi Kris, thanks for your answers. I can change the import to use setObject(int, Object, int) which works fine. > The reason the driver doesn't do this is twofold. > > 1) The driver doesn't know the target server type. Retrieving that > would induce an extra network roundtrip for execution. > > 2) Sometimes the server doesn't know the the target type and it's better > for the driver/user to provide it. Consider the call of an overloaded > function: SELECT myfunc(?), if it has an implementation for both float > and int, you want the user/driver to indicate which one should be called > because the server doesn't know. I can see the problems there ;) Regards Thomas