Re: getImportedKeys returns only one key

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: getImportedKeys returns only one key
Дата
Msg-id 1023023776.24869.158.camel@inspiron.cramers
обсуждение исходный текст
Ответ на getImportedKeys returns only one key  (Ian Wehrman <ian@labfire.com>)
Ответы Re: getImportedKeys returns only one key
Список pgsql-jdbc
Ian,

This must be a 7.1.3 issue, recent messages on the list suggest that it
works fine on 7.2 databases.

Dave
On Sat, 2002-06-01 at 14:12, Ian Wehrman wrote:
> hello all,
> i have the following relations defined:
>
> create table users (
>     UserID serial primary key,
>     UserName varchar(255) unique not null,
> ...);
>
> create table Organizations (
>     OrgID serial primary key,
>     OrgName varchar(255) unique not null,
> ...);
>
> create table UserOrgs (
>     OrgID int not null references organizations(orgid),
>     UserID int not null references users(userid),
>     primary key (userid,orgid)
> );
>
>
> and the following bit of code:
>
> Connection cn = DriverManager.getConnection(url, user, pass);
> DatabaseMetaData dbmd = cn.getMetaData();
> ResultSet rs = dbmd.getImportedKeys(null, null, "userorgs");
> while (rs.next()) {
>     out.println(rs.getString("PKTABLE_NAME"));
> }
>
> ...which prints only "organizations". In other tests I've repeatedly found
> that the ResultSet returned by getImportedKeys never contains more than one
> row.  I've tested this with the latest stable jdbc driver, the latest
> development driver, and with a driver compiled from cvs. I'm currently running
> postgresql-7.1.3 on the server. Can anyone give me a hint as to what i'm doing
> wrong, or is this a problem with the driver?
>
> Thanks,
> Ian Wehrman
>
> --
> Labfire, Inc.
> Seamless Technical Solutions
> http://labfire.com/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>




В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Thomas De Vos"
Дата:
Сообщение: Re: Big problem inserting Russian characters into Postgres using JDBC
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: getImportedKeys returns only one key