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

From Florian Weimer
Subject Re: Search content within a bytea field
Date
Msg-id 82ws4dlc4w.fsf@mid.bfk.de
Whole thread Raw
In response to Re: Search content within a bytea field  (Kris Jurka <books@ejurka.com>)
Responses Re: Search content within a bytea field  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
* 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=unspecified for the whole connection.

--
Florian Weimer                <fweimer@bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: PATCH: SET ROLE as connection parameter
Next
From: Kris Jurka
Date:
Subject: Re: Search content within a bytea field