X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 740499FA5C8 for ; Fri, 16 Jun 2006 04:55:01 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 38602-08 for ; Fri, 16 Jun 2006 04:54:58 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web32012.mail.mud.yahoo.com (web32012.mail.mud.yahoo.com [68.142.207.109]) by postgresql.org (Postfix) with SMTP id 283699F9CAA for ; Fri, 16 Jun 2006 04:54:58 -0300 (ADT) Received: (qmail 37488 invoked by uid 60001); 16 Jun 2006 07:54:55 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=b7PfREiHsfwTil6dlyCBujHR6lCwO5fhLErxFZpOlGDv3hQclHHvq2hEgq1ygYuo/obi5YtEVTxVqFKX4cCvO1pr2B9TlgTXiLeovcumn7MAFOehJ0nsyn54Toxt9r/Enee2nFFRI7j0PBlWExSw6qYfFlBdMF7D7C3aAGPHaIg= ; Message-ID: <20060616075455.37486.qmail@web32012.mail.mud.yahoo.com> Received: from [70.110.237.132] by web32012.mail.mud.yahoo.com via HTTP; Fri, 16 Jun 2006 00:54:55 PDT Date: Fri, 16 Jun 2006 00:54:55 -0700 (PDT) From: "j.random.programmer" Subject: Meta Information about columns of a domain datatype ? To: pgsql-jdbc@postgresql.org In-Reply-To: <43A74230.8030706@opencloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/38 X-Sequence-Number: 15318 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