Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 3DA87633253 for ; Sat, 5 Sep 2009 11:06:25 -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 12148-09 for ; Sat, 5 Sep 2009 14:06:05 +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 9139A633099 for ; Sat, 5 Sep 2009 11:06:14 -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 1Mjvu3-0003Zg-RT; Sat, 05 Sep 2009 16:06:07 +0200 Received: by bfk.de with local id 1Mjvu3-0003h2-No; Sat, 05 Sep 2009 14:06:07 +0000 To: Kris Jurka Cc: Tom Lane , 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> <82iqg0w2mo.fsf@mid.bfk.de> From: Florian Weimer Date: Sat, 05 Sep 2009 14:06:07 +0000 In-Reply-To: (Kris Jurka's message of "Thu\, 3 Sep 2009 13\:12\:25 -0400 \(EDT\)") Message-ID: <82ws4dlc4w.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/11 X-Sequence-Number: 19958 * Kris Jurka: > On Thu, 3 Sep 2009, Florian Weimer wrote: > >> 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. >> > > Use setObject(int, object, Types.OTHER); I get a PSQLException with "Cannot cast an instance of java.lang.String to type Types.OTHER". Other types (such as Integer) don't work, either. I look rather hard at Debian's 8.2-504-3 source but couldn't find a straightforward way to make this work, beyond specifying stringtype=3Dunspecified for the whole connection. --=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