pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ryoji Sawa <Ryoji.Sawa@Sun.COM>
To: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Cc: Sawa, Ryoji <Ryoji.Sawa@Sun.COM>
Subject: Re: [Fwd: Q: database schema from JDBC driver and netbeans.]
Date: Fri, 06 Aug 2004 18:40:54 +0900
Message-ID: <41135226.140A2523@Sun.COM> (raw)
References: <4112052D.B3192531@Sun.COM>
	<Pine.BSO.4.56.0408050919360.19085@leary.csoft.net>

 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

--



view thread (3+ messages)

Message-ID: <41135226.140A2523@Sun.COM>
Permalink:  ../41135226.140A2523@Sun.COM/
Also on:    postgresql.org/message-id/41135226.140A2523@Sun.COM

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: Ryoji.Sawa@Sun.COM, books@ejurka.com
  Subject: Re: [Fwd: Q: database schema from JDBC driver and netbeans.]
  In-Reply-To: <41135226.140A2523@Sun.COM>
  References: <4112052D.B3192531@Sun.COM> <Pine.BSO.4.56.0408050919360.19085@leary.csoft.net> <41135226.140A2523@Sun.COM>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox