Re: JDBC & custom type of variable types (!)

From: David Johnston <polobo(at)yahoo(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: JDBC & custom type of variable types (!)
Date: 2013-11-27 16:13:46
Message-ID: 1385568825883-5780590.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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.

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message plalg 2013-12-04 00:11:02 The PostgreSQl 9.3 JDBC driver fails to find foreign tables
Previous Message Dave Cramer 2013-11-27 14:02:28 Re: JDBC & custom type of variable types (!)