On Thu, 2007-12-06 at 23:21 +0000, Ted Wen wrote:
> sql = "select * from uuidtab where id=?";
> PreparedStatement ps = conn.prepareStatement(sql);
> ps.setString(1, "8555b4c4-5b3d-41ab-9f0f-c71120a583b1");
> ResultSet rs = ps.executeQuery();
> if (rs.next()) {
> System.out.println(rs.getString(1));
> }
>
> The last executeQuery() produces the following error message:
> org.postgresql.util.PSQLException: ERROR: operator does not exist: uuid =
> character varying
Try sql = "select * from uuidtab where id=?::uuid";
--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com