pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: pg@fastcrypt.com
Cc: lane@opendoors.com
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: Advice
Date: Wed, 18 Aug 2004 02:27:52 +1200
Message-ID: <412215E8.5040702@opencloud.com> (raw)
In-Reply-To: <1092752033.1622.232.camel@localhost.localdomain>
References: <4121697C.5010307@opendoors.com>
	<1092752033.1622.232.camel@localhost.localdomain>

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



view thread (6+ messages)  latest in thread

Message-ID: <412215E8.5040702@opencloud.com>
Permalink:  ../412215E8.5040702@opencloud.com/
Also on:    postgresql.org/message-id/412215E8.5040702@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, pg@fastcrypt.com, lane@opendoors.com
  Subject: Re: Advice
  In-Reply-To: <412215E8.5040702@opencloud.com>
  References: <4121697C.5010307@opendoors.com> <1092752033.1622.232.camel@localhost.localdomain> <412215E8.5040702@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox