PostgreSQL data types mapped Java classes for JDBC - Mailing list pgsql-jdbc

From Thangalin
Subject PostgreSQL data types mapped Java classes for JDBC
Date
Msg-id AANLkTikTEBsuqGZ4orEPFEgE4i+7a6GAF-w0TgQCFAdL@mail.gmail.com
Whole thread Raw
List pgsql-jdbc
Hi,

Where are the PostgreSQL data types mapped to Java classes? I have found the following from an old mailing list message:

1 data_type_id Data Type Id java.lang.Integer int4 11
2 smallint_type Smallint Type java.lang.Integer int2 6
3 int_type Int Type java.lang.Integer int4 1130 macaddr_type Macaddr Type java.lang.Object macaddr 2147483647
...
31 bit2_type Bit2 Type java.lang.Boolean bit 2
32 bitvarying5_type Bitvarying5 Type java.lang.Object varbit 5

Where is the most recent list?

Thank you!
Dave

P.S.
If these are not already in the information_schema (or similar), I think they would make for a worthwhile addition.

Individual adaptions should not be stored external to PostgreSQL. It would be trivial to set up a relation that:
  1. Maintains a current list of PostgreSQL data types.
  2. Maintains a list of adapters (perhaps with effective dating).
  3. Maps adapters to Java types.
This would centralize the knowledge and facilitate dynamic implementations that, for whatever reason, need to know the correct data type mapping in an adapter-agnostic fashion. (Ideally adapters would map the PostgreSQL data types to Java classes the same way; centralizing the list would reveal to everyone the differences in the adapters without having to scour the web.)

This doesn't have to be packaged with PostgreSQL distributions: it could be offered as a separate script that people can run to update the information schema.

pgsql-jdbc by date:

Previous
From: Thangalin
Date:
Subject: PostgreSQL data types mapped Java classes for JDBC
Next
From: John R Pierce
Date:
Subject: Re: PostgreSQL data types mapped Java classes for JDBC