X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 913D45E3F15 for ; Fri, 6 Aug 2004 06:43:09 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 11416-07 for ; Fri, 6 Aug 2004 09:43:07 +0000 (GMT) Received: from nwkea-mail-1.sun.com (nwkea-mail-1.sun.com [192.18.42.13]) by svr1.postgresql.org (Postfix) with ESMTP id A43575E381D for ; Fri, 6 Aug 2004 06:43:03 -0300 (ADT) Received: from phys-jpn-1 ([129.158.31.201]) by nwkea-mail-1.sun.com (8.12.10/8.12.9) with ESMTP id i769h3JE013958 for ; Fri, 6 Aug 2004 02:43:05 -0700 (PDT) Received: from conversion-daemon.jpn-mail1.japan.sun.com by jpn-mail1.japan.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0I2000401QSQIA@jpn-mail1.japan.sun.com> (original mail from Ryoji.Sawa@Sun.COM) for pgsql-jdbc@postgresql.org; Fri, 06 Aug 2004 18:43:04 +0900 (JST) Received: from Sun.COM (musashi.Japan.Sun.COM [129.158.29.216]) by jpn-mail1.japan.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTPA id <0I2000F8WQZRYV@jpn-mail1.japan.sun.com>; Fri, 06 Aug 2004 18:43:04 +0900 (JST) Date: Fri, 06 Aug 2004 18:40:54 +0900 From: Ryoji Sawa Subject: Re: [Fwd: Q: database schema from JDBC driver and netbeans.] To: Kris Jurka Cc: pgsql-jdbc@postgresql.org, "Sawa, Ryoji" Reply-To: Ryoji.Sawa@Sun.COM Message-id: <41135226.140A2523@Sun.COM> MIME-version: 1.0 X-Mailer: Mozilla 4.79C-CCK-MCD [en] (X11; U; SunOS 5.8 sun4u) Content-type: text/plain; charset=iso-2022-jp Content-transfer-encoding: 7BIT X-Accept-Language: en References: <4112052D.B3192531@Sun.COM> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/44 X-Sequence-Number: 10766 Dear Kris, Thank you for your responding. I'm sorry that I have not been specific. > It is not clear what Java/JDBC has to do with your question. At the current stage, I'm not sure whether JDBC or netbeans has the root cause. So I'm seeking any comments, for JDBC engineers may think the possible cause. First, I would like to know if this is known issue or not. My main purpose is to create a CMP entity bean on netbeans that accesses to Postgres table. Now I'm struggling to create a postgres database schema on netbeans. To create it, I'm using postgres74.214.jdbc3.jar JDBC driver. There are several steps to create a CMP bean. 1 create JDBC connection pool 2 create JDBC datasource 3 create JDBC persistent manager 4 create a db schema I was successful from #1 to #3 steps. I also done #4 step. But the created database schema didn't have the primary key information. I'm wondering why. To create a db schema on netbeans. . Choose a package on explorer and right-click it. . Choose 'New' -> 'Database' -> 'Database schema'. . Name the schema on a pop-up window. . Speciry driver data, database URL, user, pass. . Choose the database table to be in the schema. . Then a db scheam will be created. (However, it does not have <_primary> attribute.) The reason I showed the pg_dump is to make sure the table in postgres has the primary key. I tried to send the db schema xml file. It showed the created schema doesn't have <_primary> attribute. However, it was rejected by mail-server, for the file is regarded as a potentially dangerous file. Any comment would be appreciated about this primary key issue. Thanks and regards, Ryoji Kris Jurka wrote: > > > Hi, > > > > I'm using JDBC driver 'postgres74.214.jdbc3.jar' with Sun Java Studio > > Enterprise 6 (based on netbeans 3.42). > > I'm struggling to create a database schema from a postgres > > table. I can create a database schema from it, but it does not > > have its primary key. > > If anyone know this issue or has any solution, please kindly share > > with me. I attached the database schema created by netbeans. > > > > The dump data is here. The table 'postalcode' has a primary key. > > However, I could not create a database schema with primary key. > > > > It is not clear what Java/JDBC has to do with your question. You've shown > part of pg_dump output said something about netbeans. Are you having > problems importing your dump? Are you trying to create constraints with > JDBC? Are you trying to view constraints with DatabaseMetaData? I have > no idea what you are asking. > > Kris Jurka --