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 B02D0D1B4CA for ; Thu, 5 Aug 2004 07:02:28 -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 85803-03 for ; Thu, 5 Aug 2004 10:02:25 +0000 (GMT) Received: from nwkea-mail-2.sun.com (nwkea-mail-2.sun.com [192.18.42.14]) by svr1.postgresql.org (Postfix) with ESMTP id A8748D1B4AF for ; Thu, 5 Aug 2004 07:02:20 -0300 (ADT) Received: from phys-jpn-1 ([129.158.31.201]) by nwkea-mail-2.sun.com (8.12.10/8.12.9) with ESMTP id i75A2M0R012314 for ; Thu, 5 Aug 2004 03:02:22 -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 <0I1Y00501X0MI9@jpn-mail1.japan.sun.com> (original mail from Ryoji.Sawa@Sun.COM) for pgsql-jdbc@postgresql.org; Thu, 05 Aug 2004 19:02:22 +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 <0I1Y00EKXX7X79@jpn-mail1.japan.sun.com> for pgsql-jdbc@postgresql.org; Thu, 05 Aug 2004 19:02:21 +0900 (JST) Date: Thu, 05 Aug 2004 19:00:13 +0900 From: Ryoji Sawa Subject: [Fwd: Q: database schema from JDBC driver and netbeans.] To: pgsql-jdbc@postgresql.org Cc: Ryoji.Sawa@Sun.COM Reply-To: Ryoji.Sawa@Sun.COM Message-id: <4112052D.B3192531@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 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/33 X-Sequence-Number: 10755 Hi, Let me respost my email. I removed the attachment, for I was told that it's potentially dangerous. Any comment would be appreciated. Thanks and regards, Ryoji -------- Original Message -------- Subject: Q: database schema from JDBC driver and netbeans. Date: Thu, 05 Aug 2004 18:48:40 +0900 From: "Ryoji Sawa" Reply-To: Ryoji.Sawa@Sun.COM To: pgsql-jdbc@postgresql.org CC: Ryoji.Sawa@Sun.COM 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. -------- Start --------- -- -- PostgreSQL database dump -- SET client_encoding = 'SQL_ASCII'; SET check_function_bodies = false; SET SESSION AUTHORIZATION 'postgres'; .. .. -- -- TOC entry 7 (OID 17161) -- Name: postalcode; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE postalcode ( code character varying(7) NOT NULL, prefecture character varying(10), city character varying(20), town character varying(50) ); .. .. -- -- Data for TOC entry 11 (OID 17161) -- Name: postalcode; Type: TABLE DATA; Schema: public; Owner: postgres -- -- -- TOC entry 8 (OID 17163) -- Name: postalcode_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY postalcode ADD CONSTRAINT postalcode_pkey PRIMARY KEY (code); .. .. -------- End --------- Thanks and regards, Ryoji