Re: getTypeInfo
От | Dave Cramer |
---|---|
Тема | Re: getTypeInfo |
Дата | |
Msg-id | CADK3HHL93g0BFLp-W8+1WSiGw9CqS3EZGrvLwMPC58iQXsb1ug@mail.gmail.com обсуждение исходный текст |
Ответ на | [JDBC] getTypeInfo (Jan Motl <yzan@volny.cz>) |
Ответы |
Re: getTypeInfo
|
Список | pgsql-jdbc |
On 14 December 2016 at 07:32, Jan Motl <yzan@volny.cz> wrote:
Nothing, I just looked at the code and there is no order by on thereHi,
I noticed that getTypeInfo() may not return data in the order specified in Oracle documentation (https://docs.oracle.com/javase/7/docs/api/java/sql/ DatabaseMetaData.html# getTypeInfo()): Retrieves a description of all the data types supported by this database. They are ordered by DATA_TYPE and then by how closely the data type maps to the corresponding JDBC SQL type.With the following code snippet:try (Connection connection = dataSource.getConnection(); ResultSet rs = connection.getMetaData().getTypeInfo()) { while (rs.next()) {System.out.println(rs.getInt("DATA_TYPE")); }} catch (SQLException e) {}I am getting DATA_TYPE in a non-monotonic order:-7-2112-5...Additional metadata:JDBC driver: PostgreSQL 9.4.1212Server version: 9.6beta1.0 (9.6beta1.0)What do I do wrong?
В списке pgsql-jdbc по дате отправления: