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 82iqg0w2mo.fsf@mid.bfk.de
Whole thread Raw
In response to Re: Search content within a bytea field  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Search content within a bytea field  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
* Tom Lane:

> The JDBC environment behaves differently because setString and so on
> do not produce unmarked literals --- there's an implicit cast to
> some datatype.  So you have to make sure you've picked a
> parameter-setting function that is reasonably compatible with the
> intended operation.

You can append "?stringtype=unspecified" to the JDBC URL, and you get
bevahior which matches more closely what other (non-Java) interfaces
do.

> This is a good thing, really; it tends to keep the system from
> choosing an unexpected operation.

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.

--
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: "JUNG, Christian"
Date:
Subject: Re: PATCH: SET ROLE as connection parameter
Next
From: Kris Jurka
Date:
Subject: Re: Search content within a bytea field