From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: Datatype of domains not reported correctly.
Date: Sat, 01 Aug 2009 22:53:59 +0200
Message-ID: <h52a14$kgg$1@ger.gmane.org> (raw)
Hi,
I noticed that the getColumns() driver dos not return the proper java.sql.Types value for columns
that are defined through a domain.
I was looking at the pagila sample database. The table film contains the column release_year which
is defined as year. The domain year is defined as
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).
Maybe I'm missing something, but I would have expected the driver to return the numeric value for
the underlying datatype (java.sql.Types.INTEGER in this case).
Or at least java.sql.Types.OTHER (the way it's done for enums)
Regards
Thomas
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: spam_eater@gmx.net
Subject: Re: Datatype of domains not reported correctly.
In-Reply-To: <h52a14$kgg$1@ger.gmane.org>
References: <h52a14$kgg$1@ger.gmane.org>
* 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