Meta Information about columns of a domain datatype ?

From: "j(dot)random(dot)programmer" <javadesigner(at)yahoo(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Meta Information about columns of a domain datatype ?
Date: 2006-06-16 07:54:55
Message-ID: 20060616075455.37486.qmail@web32012.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi:

I am using the LATEST postgres 8 JDBC driver against
PostgresQL 8.1.x.

I have a O/R mapping tool that uses JDBC meta data to
generate Java
code. When using tables with a column whose datatype
is a domain,
the driver returns a typecode of 1111 (other).

Is there anyway to get information about the domain ?

I've tried
a) calling DataBaseMetaData.getAttributes(..) but
it's not implemented.
b) DataBaseMetaData.getUDTs(...) is not helpful
either.

A similar question was posted on this list about 18
months ago.

* Subject: meta data information returned for
domains
* Date: Fri, 3 Dec 2004 12:13:13 +0900

However, there wasn't a resolution then.

Is this problem solved/fixable ? Any suggestions ?

Here is the specific SQL.
--------------------------------------------------------
CREATE DOMAIN sex AS CHARACTER(1) CHECK (VALUE in
('m', 'f'));

CREATE TABLE subject (
subject_id SERIAL CONSTRAINT NN_subject_id NOT
NULL,
fname CHARACTER VARYING(99),
lname CHARACTER VARYING(99) CONSTRAINT NN_lname
NOT NULL,
dob DATE,
sex sex CONSTRAINT NN_sex NOT NULL,
CONSTRAINT PK_subject PRIMARY KEY (subject_id)
);
------------------------------------------------------

It all breaks for the 'sex' column. (and no, not using
domains is
not an option since the actual database is very very
complex).

:-)

Best regards,
--j

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2006-06-16 11:37:16 Re: concurrency problem
Previous Message sathish 2006-06-16 06:15:32 concurrency problem