From: David Johnston <polobo@yahoo.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: JDBC & custom type of variable types (!)
Date: Wed, 27 Nov 2013 08:13:46 -0800 (PST)
Message-ID: <1385568825883-5780590.post@n5.nabble.com> (raw)
In-Reply-To: <B6F6FD62F2624C4C9916AC0175D56D880CE4B473@jenmbs01.ad.intershop.net>
References: <B6F6FD62F2624C4C9916AC0175D56D880CE4B473@jenmbs01.ad.intershop.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
Marc Mamin-2 wrote
> Can I rely on a ClassCastException as below to find the correct matching?
> even when the custom type has NULL(s) in it ?
Even if you could you should not. Generating exceptions is expensive. Try
"instanceof" testing instead.
I don't know enough bounce custom types in JDBC but as the column has the
type, not the value, the result of getObject should be known even if NULL is
involved.
David J.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/JDBC-custom-type-of-variable-types-tp5780512p5780590.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
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: polobo@yahoo.com
Subject: Re: JDBC & custom type of variable types (!)
In-Reply-To: <1385568825883-5780590.post@n5.nabble.com>
References: <B6F6FD62F2624C4C9916AC0175D56D880CE4B473@jenmbs01.ad.intershop.net> <1385568825883-5780590.post@n5.nabble.com>
* 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