pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sylvain Leroux <sl20@wanadoo.fr>
To: pgsql-jdbc@postgresql.org
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: Search content within a bytea field
Date: Mon, 31 Aug 2009 09:38:49 +0200
Message-ID: <4A9B7E09.1000300@wanadoo.fr> (raw)
In-Reply-To: <4017.1251673129@sss.pgh.pa.us>
References: <6fb522db0908301333o3bfeb6e9l5c2ad9dd04308e18@mail.gmail.com>
	<4A9AF477.5040706@wanadoo.fr>
	<4017.1251673129@sss.pgh.pa.us>

Hi,

And sorry for that:

Tom Lane a écrit :
> Sylvain Leroux <sl20@wanadoo.fr> writes:
>> It seems to me that the problem is comming from the BYTEA type, not from 
>> the prepared statement by itself: As far as I know the only operator 
>> supported by BYTEA is concatenation. You can't even compare two BYTEA 
>> for (in)equality - even less using the LIKE operator.
> 
> Nonsense ...

But I was quite sure to have read that somewhere -- and indeed:
(in "PostgreSQL - second edition / ISBN:978-0-672-32756-8)
"PostgreSQL offers a single BYTEA operator: concatenation. [...]
  Note that you can't compare two BYTEA values, even for
  equality/inequality. You can of course convert a BYTEA value into
  another value using CAST() operator, and that opens up other
  operators."

I remember having found that annoying at the time - that's why I 
remembered it. But it appears this statement was outdated -- or simple 
false all along?

Anyway once again sorry for the misinformation.
Sylvain.

--
Website: http://www.chicoree.fr





view thread (13+ messages)  latest in thread

Message-ID: <4A9B7E09.1000300@wanadoo.fr>
Permalink:  ../4A9B7E09.1000300@wanadoo.fr/
Also on:    postgresql.org/message-id/4A9B7E09.1000300@wanadoo.fr

 · 

reply

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: sl20@wanadoo.fr, tgl@sss.pgh.pa.us
  Subject: Re: Search content within a bytea field
  In-Reply-To: <4A9B7E09.1000300@wanadoo.fr>
  References: <6fb522db0908301333o3bfeb6e9l5c2ad9dd04308e18@mail.gmail.com> <4A9AF477.5040706@wanadoo.fr> <4017.1251673129@sss.pgh.pa.us> <4A9B7E09.1000300@wanadoo.fr>

* 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