Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id C9B19635254 for ; Mon, 31 Aug 2009 05:49:36 -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 70723-01-5 for ; Mon, 31 Aug 2009 08:49:21 +0000 (UTC) Received: from mx3.hub.org (mx3.hub.org [206.223.169.73]) by mail.postgresql.org (Postfix) with ESMTP id 081D763582F for ; Mon, 31 Aug 2009 05:42:40 -0300 (ADT) X-Greylist: delayed 00:08:15.497635 by SQLgrey-1.7.6 Received: from mail-bw0-f206.google.com (mail-bw0-f206.google.com [209.85.218.206]) by mx3.hub.org (Postfix) with ESMTP id 0FF0337C9A9 for ; Mon, 31 Aug 2009 03:15:53 -0300 (ADT) Received: by bwz2 with SMTP id 2so2585963bwz.19 for ; Sun, 30 Aug 2009 23:14:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=nGvdnD3en2Qzk/uEGXw+OsqTQRUqweoqA8TfXoHNVAo=; b=GxO1keki8kEWbRyPWzxedau2uK/vCtBID+E0xp7Txtbb1YAUxA8Z6bJD203td7mpkN V0M/x/Oi/jP3MrEI6aQAbFBQ0x1uznpN93mfhuOYGPUaA2k8VV88hTdHlrarxm+WPnUU kKYYm7QDcihpuSsPH1i7nEbaJdg3C9CY9ygms= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=lN1TwjFW/gE3d/si5Jgq6v/v6KOqoJEY4JQbieZ3IuKbvWKTI980D57gRtMbZmPAAd Hz7PLu6IzIRU+SBuzZR045VyNIxVSJw4TixfX67VEghPGtvIaZxVHEshi1nLNvxgM04c z/AbqlsBfG2lJId16ZgcACyqutRpSFAOpiy8w= MIME-Version: 1.0 Received: by 10.204.161.197 with SMTP id s5mr3979881bkx.8.1251698923801; Sun, 30 Aug 2009 23:08:43 -0700 (PDT) In-Reply-To: <4017.1251673129@sss.pgh.pa.us> References: <6fb522db0908301333o3bfeb6e9l5c2ad9dd04308e18@mail.gmail.com> <4A9AF477.5040706@wanadoo.fr> <4017.1251673129@sss.pgh.pa.us> Date: Mon, 31 Aug 2009 08:08:43 +0200 Message-ID: <6fb522db0908302308k2775370ct55547ecdf5a732a9@mail.gmail.com> Subject: Re: Search content within a bytea field From: Damiano Bolzoni To: Tom Lane Cc: Sylvain Leroux , pgsql-jdbc@postgresql.org 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=-0.74 tagged_above=-10 required=5 tests=BAYES_20=-0.74 X-Spam-Level: X-Archive-Number: 200908/93 X-Sequence-Number: 19942 > But this does point out the problem: LIKE (a/k/a ~~) on a bytea wants > a bytea on the righthand side, not text or varchar. =A0So setString is > the wrong thing to use. Perhaps something like: setBytes(myString.getBytes()) ?