Ross, > > From: Ross Johnson <[EMAIL PROTECTED]> > > To: [EMAIL PROTECTED] > > Cc: OpenOffice.org Users List <[email protected]> > > Subject: Re: [users] OOo2 PostgreSQL database - defining Primary Key > > for table > > Date: Sun, 23 Apr 2006 02:25:53 +1000 > > > > On Sat, 2006-04-22 at 18:32 +1000, Philip Rhoades wrote: > > > People, > > > > > > Using JDBC I can connect to my Postgres DB and can create tables from > > > OOo2 but I can't define the primary keys - the Help page is not much > > > help . . > > > > > > Defining the primary key for an OOo DB works alright. > > > > > > Any suggestions? > > > > Hi, > > > > In Base, go to "Tools - SQL" and execute the PostgreSQL SQL command > > directly. E.g. > > > > ALTER TABLE "TableName" ADD CONSTRAINT "ConstraintName" PRIMARY KEY > > ("pkColumnName") > > > > Don't forget that you need to use double quotes around PostgreSQL > > identifiers in SQL if you used mixed case, spaces in names, etc. when > > you designed your table. > > > > Also don't forget to refresh tables or you won't see the key emblem on > > the primary key column if you open the table up in edit mode again to > > check it worked.
Thanks for that but I could do that just as easily at a psql prompt - why can't I do the same as I can do with an OO DB ie right click on the row marker and select primary key? ie create the Primary Key via a graphical method. Regards, Phil. -- Philip Rhoades Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275) GPO Box 3411 Sydney NSW 2001 Australia Mobile: +61:(0)411-185-652 Fax: +61:(0)2-8221-9599 E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
