Re: Search content within a bytea field - Mailing list pgsql-jdbc

From Sylvain Leroux
Subject Re: Search content within a bytea field
Date
Msg-id 4A9B7E09.1000300@wanadoo.fr
Whole thread Raw
In response to Re: Search content within a bytea field  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-jdbc
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



pgsql-jdbc by date:

Previous
From: Tom Lane
Date:
Subject: Re: Search content within a bytea field
Next
From: Damiano Bolzoni
Date:
Subject: Re: Search content within a bytea field