|
|||||||||||
|
Re: [JDBC] TypeInfoCache
From: Oliver Jowett <oliver(at)opencloud.com>
Date: Fri Dec 21 2007 - 16:36:41 EST
> Noticed the asterisked Can't you just use getString() or getObject() on any type you don't recognize and let the driver deal with any necessary casting? > Maybe I'm missing They're mappings of standard PostgreSQL types, and they use driver infrastructure that allows adding of specific support for any user-defined type that happens to get installed in the DB (type extensibility is a fairly big thing in PostgreSQL, why would we ignore it?). The geometric types are quite a bit more than just another data structure, there are various "spatial" indexes and queries you can run against them. Same is generally true of other custom types, they have their own indexing and operator behaviour which is why they're there in the first place. If you don't want to use the type the driver implements you don't have to, getString() still works just fine (or somewhat more indirectly - getObject() -> I don't recognize the returned object -> call toString() on it) How would you rather have the driver handle these types, if not in this way? -O ---------------------------(end of broadcast)---------------------------TIP 5: don't forget to increase your free space map settings Received on Fri Dec 21 16:38:22 2007 This archive was generated by hypermail 2.1.8 : Wed Jun 18 2008 - 23:41:53 EDT |
||||||||||
|
|||||||||||