Background
Map the column data type to the corresponding Java class.
Problem
The request returns meta information from the database:
SELECT
rb.object_schema,
rb.object_name,
rb.column_name
FROM
dictionary.resource_bundle rb
For example, this query returns (self-referential):
dictionary, resource_bundle, column_name
Where "dictionary" is the schema name, "resource_bundle" is object_name, and "column_name" is column_name.
It would be great to do something like:
SELECT
rb.object_schema,
rb.object_name,
rb.column_name,
rb.column_type
FROM
dictionary.resource_bundle rb
And return this request:
dictionary, resource_bundle, column_name, varchar
Then use JDBC to find out what is varchar displayed before java.lang.String.
Questions
- In PostgreSQL, how do you determine which type is used to store data, given the name of the schema, the name of the object (guaranteed to be a table or view), and the name of the column?
- ( JDBC), ?
!