DatabaseMetaData.getTypeInfo() question

Поиск
Список
Период
Сортировка
От Roger Bjärevall
Тема DatabaseMetaData.getTypeInfo() question
Дата
Msg-id 3F851EF1.2030902@minq.se
обсуждение исходный текст
Ответы Re: DatabaseMetaData.getTypeInfo() question  (Dave Cramer <Dave@micro-automation.net>)
Re: DatabaseMetaData.getTypeInfo() question  (Kris Jurka <books@ejurka.com>)
Список pgsql-jdbc
Hi,

We are currently testing the upcoming version of DbVisualizer with
PostgreSQL and the JDBC drivers.

We have one concern and that is the information returned from the
DatabaseMetaData.getTypeInfo() method.

It returns a lots of information, some are data type info while some
are tables or functions(?).

We did a quick comparision of the supported data types as listed in the
PostgreSQL documenation and what is returned by the getTypeInfo call.
The result is rather confusing for us.

(http://www.postgresql.org/docs/7.3/static/datatype.html)

- Among the real data types we find types such as:

   TYPE_NAME    DATA_TYPE    PRECISION
   pg_cast    1111        9
   pg_class    1111        9
   pg_constraint    1111        9
   pg_conversion    1111        9
   pg_database    1111        9

   What is this and why do they appear when getting type info?

- The documentation lists data types as "Type Name" and "Aliases".
   Why do the getTypeInfo() call return the aliased name for almost
   all data types that have an alias instead of the in most cases
   preferred "Type Name"?
   I.e we believe that users coming from other databases would prefeer
   "bigint" rather then "int8", "smallint" rathern then "int2", etc.
   There are some exceptions to this such as the "varchar" alias which
   is more common then "character varying".

   One solution is simply to add the real type names to the existing list
   of data types as returned by the getTypeInfo() call.

Any feedback is appreciated.

Roger Bjärevall
Minq Software







--
Roger Bjärevall
Product Manager

Minq Software AB
Stockholm, Sweden
Phone:  +46 8 55602760
Fax:    +46 8 55602777
roger.bjarevall@minq.se
http://www.minq.se


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Barry Lind
Дата:
Сообщение: Re: Problem with bytea getBytes and setBytes
Следующее
От: Nicola Pero
Дата:
Сообщение: Using JDBC and libpq in the same process