Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 7DF3B632ED7 for ; Thu, 3 Sep 2009 10:59:30 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 23897-01 for ; Thu, 3 Sep 2009 13:59:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx01.bfk.de (mx01.bfk.de [193.227.124.2]) by mail.postgresql.org (Postfix) with ESMTP id AA8E46328A5 for ; Thu, 3 Sep 2009 10:59:17 -0300 (ADT) Received: from mx00.int.bfk.de ([10.119.110.2]) by mx01.bfk.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) id 1MjCqF-0002Hj-VY; Thu, 03 Sep 2009 15:59:12 +0200 Received: by bfk.de with local id 1MjCqF-0001lG-SH; Thu, 03 Sep 2009 13:59:11 +0000 To: Tom Lane Cc: Damiano Bolzoni , Sylvain Leroux , pgsql-jdbc@postgresql.org Subject: Re: Search content within a bytea field References: <6fb522db0908301333o3bfeb6e9l5c2ad9dd04308e18@mail.gmail.com> <4A9AF477.5040706@wanadoo.fr> <6fb522db0908302306n7fcda5f7ncd7423f650855dca@mail.gmail.com> <798.1251727871@sss.pgh.pa.us> From: Florian Weimer Date: Thu, 03 Sep 2009 13:59:11 +0000 In-Reply-To: <798.1251727871@sss.pgh.pa.us> (Tom Lane's message of "Mon\, 31 Aug 2009 10\:11\:11 -0400") Message-ID: <82iqg0w2mo.fsf@mid.bfk.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200909/7 X-Sequence-Number: 19954 * Tom Lane: > The JDBC environment behaves differently because setString and so on > do not produce unmarked literals --- there's an implicit cast to > some datatype. So you have to make sure you've picked a > parameter-setting function that is reasonably compatible with the > intended operation. You can append "?stringtype=3Dunspecified" to the JDBC URL, and you get bevahior which matches more closely what other (non-Java) interfaces do. > This is a good thing, really; it tends to keep the system from > choosing an unexpected operation. It more or less prevents use of fancy types. There doesn't seem to be to set an unspecified type on a per-parameter basis, unfortunately. --=20 Florian Weimer BFK edv-consulting GmbH http://www.bfk.de/ Kriegsstra=DFe 100 tel: +49-721-96201-1 D-76133 Karlsruhe fax: +49-721-96201-99