From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: Re: State of the support for the hstore ? operator
Date: Wed, 18 Nov 2015 11:53:54 +0100
Message-ID: <n2hlc2$j4f$1@ger.gmane.org> (raw)
In-Reply-To: <A737B7A37273E048B164557ADEF4A58B50FE7023@ntex2010i.host.magwien.gv.at>
References: <n2ha84$5u8$1@ger.gmane.org>
<A737B7A37273E048B164557ADEF4A58B50FE7023@ntex2010i.host.magwien.gv.at>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
Albe Laurenz schrieb am 18.11.2015 um 11:35:
>> I just stumbled upon this (using postgresql-9.4-1205.jdbc42.jar)
>>
>> Statement stmt = con.createStatement();
>> ResultSet rs = stmt.executeQuery("select count(*) from product where attributes ? 'location_id'");
>>
>> results in
>>
>> org.postgresql.util.PSQLException: ERROR: syntax error at or near "$1"
>>
> I looked into the source, and you can escape the question mark by doubling it.
Ah, right, thanks.
I knew there was something available - I tried \? and "?" but didn't think of ??
Thomas
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
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: spam_eater@gmx.net
Subject: Re: State of the support for the hstore ? operator
In-Reply-To: <n2hlc2$j4f$1@ger.gmane.org>
References: <n2ha84$5u8$1@ger.gmane.org> <A737B7A37273E048B164557ADEF4A58B50FE7023@ntex2010i.host.magwien.gv.at> <n2hlc2$j4f$1@ger.gmane.org>
* 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