pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Thomas Kellerer <spam_eater@gmx.net>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Datatype of domains not reported correctly.
Date: Mon, 3 Aug 2009 13:44:26 -0400 (EDT)
Message-ID: <alpine.BSO.2.00.0908031340110.17897@leary.csoft.net> (raw)
In-Reply-To: <h52a14$kgg$1@ger.gmane.org>
References: <h52a14$kgg$1@ger.gmane.org>



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



view thread (3+ messages)  latest in thread

Message-ID: <alpine.BSO.2.00.0908031340110.17897@leary.csoft.net>
Permalink:  ../alpine.BSO.2.00.0908031340110.17897@leary.csoft.net/
Also on:    postgresql.org/message-id/alpine.BSO.2.00.0908031340110.17897@leary.csoft.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: books@ejurka.com, spam_eater@gmx.net
  Subject: Re: Datatype of domains not reported correctly.
  In-Reply-To: <alpine.BSO.2.00.0908031340110.17897@leary.csoft.net>
  References: <h52a14$kgg$1@ger.gmane.org> <alpine.BSO.2.00.0908031340110.17897@leary.csoft.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox