Adding a New Composite Constraint to an Existing Table.

Поиск
Список
Период
Сортировка
От Bhuvan A
Тема Adding a New Composite Constraint to an Existing Table.
Дата
Msg-id Pine.LNX.4.20.0202091548400.8097-100000@Larry.bks
обсуждение исходный текст
Ответы Re: Adding a New Composite Constraint to an Existing Table.  (MindTerm <mindterm@yahoo.com>)
Re: Adding a New Composite Constraint to an Existing Table.  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-sql
Hi,

I am using postgresql 7.1.  I was unable to add a new PRIMARY KEY
constraint to an existing table.

i have table,
CREATE TABLE xx
( id int, name text, amount int
);

I have say some 10 records in this table, which are unique and not
null (primary). Fine! Now, i am willing to have primary key constraint
to all the 3 fields.

I tried,

bhuvan=> ALTER TABLE xx ADD primary key (id, name, amount); 
ERROR:  ALTER TABLE / ADD CONSTRAINT is not implemented for that 
constraint type.

Where i am wrong? How else, can i get that primary key constraint
WITHOUT RECREATING that table?

Hope to get some lights.

Regards,
Bhuvaneswar.




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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Multiprocessor support for 7.2
Следующее
От: MindTerm
Дата:
Сообщение: Re: Adding a New Composite Constraint to an Existing Table.