| From: | Kris Jurka <books(at)ejurka(dot)com> |
|---|---|
| To: | Thomas Kellerer <spam_eater(at)gmx(dot)net> |
| Cc: | pgsql-jdbc(at)postgresql(dot)org |
| Subject: | Re: Datatype of domains not reported correctly. |
| Date: | 2009-08-03 17:44:26 |
| Message-ID: | alpine.BSO.2.00.0908031340110.17897@leary.csoft.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas Kellerer | 2009-08-03 18:11:25 | Re: Datatype of domains not reported correctly. |
| Previous Message | Oliver Jowett | 2009-08-02 22:20:47 | Re: How to retry when connection has been closed? |