Re: Create Primary Key?

Поиск
Список
Период
Сортировка
От darcy@druid.net (D'Arcy J.M. Cain)
Тема Re: Create Primary Key?
Дата
Msg-id m13U6GW-000AWSC@druid.net
обсуждение исходный текст
Ответ на Re: Create Primary Key?  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Ответы Re: Create Primary Key?  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-sql
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 primary key
and use it.

> > 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.

Why not just use the copy function?  That's what it's for.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.


В списке pgsql-sql по дате отправления:

Предыдущее
От: Webb Sprague
Дата:
Сообщение: Re: Create Primary Key + Massive Copy's?
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Create Primary Key?