There are known issues of long standing in PL/Java’s conversions to and from these types, detailed in issue #200. The conversions of non-zoned values involve a hidden dependency on the PostgreSQL session’s current setting of TimeZone, which can vary from session to session at the connecting client’s preference. For all of these conversions but one, PL/Java must do time zone computations, with the one exception being, unintuitively, timestamp with time zone. Those classes have never been a good representation for PostgreSQL date/time values, because they are based on, which implies knowledge of a time zone, even when they are used to represent PostgreSQL values with no time zone at all. The JDBC getObject and readObject methods that do not take a Class parameter will return objects of those types when retrieving PostgreSQL date or time values. PL/Java function parameters and returns can be declared in Java to have those types, objects of those types can be passed to tObject, ResultSet.updateObject, and SQLOutput.writeObject methods, as well as to the methods that are specific to those types. The first mappings to be specified in JDBC used the JDBC-specific classes, , and, all of which are based on (but only as an implementation detail they should always be treated as their own types and not as instances of ). Mapping between PostgreSQL and Java date/time types Legacy JDBC mappings
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |