Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 95904633BB6 for ; Sat, 5 Sep 2009 11:27:05 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 63480-10 for ; Sat, 5 Sep 2009 14:26:57 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by mail.postgresql.org (Postfix) with ESMTP id 0EECE63396A for ; Sat, 5 Sep 2009 11:26:58 -0300 (ADT) Received: from [192.168.7.181] (cpe-76-95-37-138.socal.res.rr.com [76.95.37.138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail63.csoft.net (Postfix) with ESMTPSA id 794A728448; Sat, 5 Sep 2009 10:26:55 -0400 (EDT) Message-ID: <4AA2752D.60709@ejurka.com> Date: Sat, 05 Sep 2009 07:26:53 -0700 From: Kris Jurka User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Florian Weimer CC: Kris Jurka , 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> <82ws4dlc4w.fsf@mid.bfk.de> In-Reply-To: <82ws4dlc4w.fsf@mid.bfk.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/12 X-Sequence-Number: 19959 Florian Weimer wrote: > * Kris Jurka: > >> 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=unspecified for the whole connection. > This is new functionality in 8.3 and newer drivers. Kris Jurka