X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id ECEC65E46F6 for ; Tue, 17 Aug 2004 11:28:25 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 96087-08 for ; Tue, 17 Aug 2004 14:28:20 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 091AF5E46EC for ; Tue, 17 Aug 2004 11:28:17 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=opencloud.com) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1Bx4wb-0007dy-00; Wed, 18 Aug 2004 02:28:09 +1200 Message-ID: <412215E8.5040702@opencloud.com> Date: Wed, 18 Aug 2004 02:27:52 +1200 From: Oliver Jowett User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pg@fastcrypt.com Cc: lane@opendoors.com, "pgsql-jdbc@postgresql.org" Subject: Re: Advice References: <4121697C.5010307@opendoors.com> <1092752033.1622.232.camel@localhost.localdomain> In-Reply-To: <1092752033.1622.232.camel@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/103 X-Sequence-Number: 10825 Dave Cramer wrote: > there is a well known issue with serial8. The index will not be used if > you do select foo where serialvalue=1; > you need to cast the 1 to int8 > ie select foo where serialvalue=1::int8 ( this is fixed in 8.0 ) This should also be fixed if you use the latest development driver, connect to a 7.4 or later server, and use setLong() (or setObject with Types.BIGINT) to set the parameter value. The V3 protocol Parse/Bind messages that newer drivers generate will specify int8 for the parameter type in this case, which is roughly equivalent to explicitly casting the parameter to int8. I haven't tested this, though -- it's theoretical :) -O