Re: Multi column foreign keys.

From: Kris Jurka <books(at)ejurka(dot)com>
To: Mofeed Shahin <mofeed(dot)shahin(at)dsto(dot)defence(dot)gov(dot)au>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Multi column foreign keys.
Date: 2003-12-10 03:01:08
Message-ID: Pine.LNX.4.33.0312092151550.9245-200000@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Wed, 10 Dec 2003, Mofeed Shahin wrote:

> Some questions though:
> When I do
> DatabaseMetaData metaData = connection.getMetaData ();
> ResultSet tableResultSet = metaData.getTables ("", null, null, new
> String[]{"TABLE"})
>
> I'm actually getting alot more tables than I wanted. I seem to be getting all
> the system tables, which I don't want.

With 7.4 came the information_schema which I believe is what you are
seeing. The attached patch should fix that.

> I also get messages like :
> "Column is_insertable_into in table views has unknown type code 1111"

This message is probably from your own code after doing
DatabaseMetaData.getColumns() on information_schema.views. The DATA_TYPE
column is returning java.sql.Types.OTHER which you don't know how to
handle. Perhaps we need to look at how domains are handled here and it
should return the base type's code, but as this problem is in the
information schema you shouldn't have to deal with in.

Kris Jurka

Attachment Content-Type Size
gettables_info_schem.patch text/plain 6.0 KB

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Olivier Hubaut 2003-12-10 09:27:45 Bug in JDBC CREATE FUNCTION syntax?
Previous Message Dave Cramer 2003-12-10 01:36:02 7.4 jars for download