Re: drop constraint primary key

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: drop constraint primary key
Дата
Msg-id 10247.1033664978@sss.pgh.pa.us
обсуждение исходный текст
Ответ на drop constraint primary key  ("Marie G. Tuite" <marie.tuite@edisonaffiliates.com>)
Список pgsql-sql
"Marie G. Tuite" <marie.tuite@edisonaffiliates.com> writes:
> Running above, am trying to drop the primary key, but get the follwing
> error.
> project=# alter table class_teacher_rlt drop constraint
> class_teacher_rlt_pkey restrict;
> ERROR:  ALTER TABLE / DROP CONSTRAINT: class_teacher_rlt_pkey does not exist

In 7.2 DROP CONSTRAINT only works for CHECK-type constraints; you'll
have to drop the underlying index directly to get rid of a
primary-key-type constraint.

7.3 does allow DROP CONSTRAINT for this.
        regards, tom lane


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

Предыдущее
От: "Marie G. Tuite"
Дата:
Сообщение: drop constraint primary key
Следующее
От: Vincent-Olivier Arsenault
Дата:
Сообщение: order by x DESC, y ASC indexing problem