| От | Dave Cramer |
|---|---|
| Тема | internal type cache, and getUDT implementation |
| Дата | |
| Msg-id | 1085146663.1687.52.camel@localhost.localdomain обсуждение исходный текст |
| Список | pgsql-jdbc |
I've been working on getUDT's and in order to fully comply with the spec, java.sql.Types.* has to be returned for the base type in the case of a domain. This requires quite a big select statement, which essentially does a case 'char' then java.sql.VARCHAR.... attached is the patch for this. However at one time I considered translating the returned value in the result set. This required that I knew the pg_type oid for each type in advance. Currently the driver gets and cache's these in a static hashmap as it requires them. This is either inefficient or flawed depending on the way you look at it. Flawed: The assumption here is that we don't know the type oid's in advance and that the backend might change them. If this is the case and the driver happens to be connected to two different versions ( with different pg_type oid's ) of backends, then one of them will be wrong, as the cache is static. Inefficient: I've asked on hackers and they are willing to guarantee that type oid's won't change, so why bother looking them up ? Dave -- Dave Cramer 519 939 0336 ICQ # 14675561
В списке pgsql-jdbc по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера