Re: [SQL] Create Primary Key?

2000-08-30 Thread Stephan Szabo
On Wed, 30 Aug 2000, D'Arcy J.M. Cain wrote: > Thus spake Stephan Szabo > > We don't currently support the SQL syntax for adding > > a PK to a table. However, if you have the columns > > as NOT NULL already, adding a unique index to the > > columns in question has the same general effect. > >

Re: [SQL] Create Primary Key?

2000-08-30 Thread D'Arcy J.M. Cain
Thus spake Stephan Szabo > We don't currently support the SQL syntax for adding > a PK to a table. However, if you have the columns > as NOT NULL already, adding a unique index to the > columns in question has the same general effect. Except for interfaces such as PyGreSQL that recognize the pri

Re: [SQL] Create Primary Key + Massive Copy's?

2000-08-29 Thread Webb Sprague
This is my next approach--I got rid of all indexes and PK's, and then created an index with unique after everything is added. Wish me luck. W --- Stephan Szabo <[EMAIL PROTECTED]> wrote: > > We don't currently support the SQL syntax for adding > a PK to a table. However, if you have the column

Re: [SQL] Create Primary Key?

2000-08-29 Thread Jie Liang
Hi, It suppose to use ALTER TABLE tablename ADD constraint xxx primary key(columnname), unforturatly, Pg7.0 still haven't implemented it yet, so except foreign key ,other constarints, you have to choose: 1. rename your old table, recreate an new one with primary key, then use insert into newtabl

Re: [SQL] Create Primary Key?

2000-08-29 Thread Stephan Szabo
We don't currently support the SQL syntax for adding a PK to a table. However, if you have the columns as NOT NULL already, adding a unique index to the columns in question has the same general effect. Stephan Szabo [EMAIL PROTECTED] On Tue, 29 Aug 2000, Webb Sprague wrote: > Apropos of my la

[SQL] Create Primary Key?

2000-08-29 Thread Webb Sprague
Apropos of my last question: Is there syntax to create a primary key after the table has been defined and populated? I think I could speed things up quite a bit by not having any indexes at all when I do my mass copies. Thanks, and my apologies if that is a totally stupid question. W