On Sat, 1 Aug 2009, Thomas Kellerer wrote:
> I noticed that the getColumns() driver dos not return the proper
> java.sql.Types value for columns that are defined through a domain.
>
> CREATE DOMAIN year AS integer
> CONSTRAINT year_check CHECK (((VALUE >= 1901) AND (VALUE <= 2155)));
>
> When using getColumns() the driver returns the value 2001 for DATA_TYPE
> (which is java.sql.Types.DISTINCT).
DISTINCT is the JDBC equivalent term for domains.
See Chapter 16 if the JDBC4 spec.
DISTINCT type - a user-defined type based on a built-in type; for
example: CREATE TYPE MONEY AS NUMERIC(10,2) FINAL
So I believe we're doing the right thing here, although our support for
DISTINCT elsewhere is probably lacking.
Kris Jurka