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 255ACEAE4FB for ; Sat, 23 Oct 2004 12:53:44 +0100 (BST) 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 33638-06 for ; Sat, 23 Oct 2004 11:53:53 +0000 (GMT) Received: from candata.com (gateway.candata.com [204.225.91.106]) by svr1.postgresql.org (Postfix) with ESMTP id B0CE5EAE4FD for ; Sat, 23 Oct 2004 12:53:40 +0100 (BST) Received: from davehome ([192.168.2.240]) by candata.com (8.12.9/8.12.9) with ESMTP id i9NBsDh7006327 for ; Sat, 23 Oct 2004 07:54:14 -0400 Subject: Problem with fixed length fields. From: Dave Smith To: pgsql-jdbc@postgresql.org Content-Type: text/plain Message-Id: <1098532450.2684.3.camel@davehome> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sat, 23 Oct 2004 07:54:10 -0400 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: 200410/241 X-Sequence-Number: 11346 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?