Re: Syntax error in DROP CONSTRAINT

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Syntax error in DROP CONSTRAINT
Дата
Msg-id 20041117064315.B17486@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Syntax error in DROP CONSTRAINT  ("Rajan Bhide" <rbhide@starentnetworks.com>)
Список pgsql-novice
On Wed, 17 Nov 2004, Rajan Bhide wrote:

> Hi Forum,
>
> I need to add a colume to existing composite primary key on a table.
> I tried using following:
> >> ALTER TABLE DROP CONSTRAINT tablename_pkey;
> >> ALTER TABLE ADD CONSTRAINT PRIMARY KEY (col1, col2, col3, new_col4);
>
> When I try this using Postgres 7.2.4 I get psql syntax error in DROP
> CONSTRAINT.
> ERROR:  parser: parse error at or near ";"

I believe 7.2 requires RESTRICT at the end and the online docs imply that
it won't remove primary keys in any case so you'll probably need to drop
the index that was created for the constraint instead of using DROP
CONSTRAINT.


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

Предыдущее
От: "Vishal Kashyap @ [SaiHertz]"
Дата:
Сообщение: Re: upgrade from postgres 7.3.2
Следующее
От: sarlav kumar
Дата:
Сообщение: Re: upgrade from postgres 7.3.2