Re: JDBC and the hstore ? operator - no longer working withbuild 1211 - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: JDBC and the hstore ? operator - no longer working withbuild 1211
Date
Msg-id CADK3HHJ50aqPHqGOdpeja1tHnpgju8HwKA9Yi8j_1wk0n58ifg@mail.gmail.com
Whole thread Raw
In response to JDBC and the hstore ? operator - no longer working with build 1211  (Thomas Kellerer <spam_eater@gmx.net>)
Responses Re: JDBC and the hstore ? operator - no longer working withbuild 1211
List pgsql-jdbc
Thomas,

This has been "broken" for a while now, you have to use ?? to get it to work.


On 31 October 2016 at 17:07, Thomas Kellerer <spam_eater@gmx.net> wrote:
The support for using the hstore ? operator without a PreparedStatement worked with build 1208, but is broken (again) with build 1211

The following works with build 1208

  Connection conn = DriverManager.getConnection(...);
  Statement stmt = conn.createStatement();
  ResultSet rs = stmt.executeQuery("select * from some_table where hstore_column ? 'foo');

with build 1211 it throws an exception with the message:

   org.postgresql.util.PSQLException: ERROR: syntax error at or near "$1"

Was this intended to work in build 1208 or was that just by accident?

Thomas






--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Re: JDBC and the hstore ? operator - no longer working with build 1211
Next
From: Vladimir Sitnikov
Date:
Subject: Re: JDBC and the hstore ? operator - no longer working withbuild 1211