pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Smith <dave.smith@candata.com>
To: pgsql-jdbc@postgresql.org
Subject: Problem with fixed length fields.
Date: Sat, 23 Oct 2004 07:54:10 -0400
Message-ID: <1098532450.2684.3.camel@davehome> (raw)

Platform:
Postgres 7.4.5, lastest JDBC driver from CVS.

Table:
create table t(a char(2),b char(2));
insert into t values ('  ','  ');

Jdbc: 

This query finds nothing
PreparedStatement st = db.prepareStatement("select * from t where a=?
and b=?");
st.setString(1,"  ");
st.setString(2,"  ");
ResultSet rs = st.executeQuery();

This query works
rs = db.prepareStatement("select * from t where a='  ' and b=' 
'").executeQuery();

Why?








view thread (8+ messages)  latest in thread

Message-ID: <1098532450.2684.3.camel@davehome>
Permalink:  ../1098532450.2684.3.camel@davehome/
Also on:    postgresql.org/message-id/1098532450.2684.3.camel@davehome

 · 

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: dave.smith@candata.com
  Subject: Re: Problem with fixed length fields.
  In-Reply-To: <1098532450.2684.3.camel@davehome>
  References: <1098532450.2684.3.camel@davehome>

* 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