Re: Syntax of: alter table ... add constraint ...

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: Syntax of: alter table ... add constraint ...
Дата
Msg-id 4CD813A3.4000709@iol.ie
обсуждение исходный текст
Ответ на Syntax of: alter table ... add constraint ...  (Alexander Farber <alexander.farber@gmail.com>)
Ответы Re: Syntax of: alter table ... add constraint ...  (Alexander Farber <alexander.farber@gmail.com>)
Список pgsql-general
On 08/11/2010 14:50, Alexander Farber wrote:

> alter table pref_users add constraint pref_users_medals_check (medals>= 0);
> ERROR:  syntax error at or near "("
> LINE 1: ...pref_users add constraint pref_users_medals_check (medals>=...
>                                                               ^
> and many combinations of quotes and "check" inbetween,
> but can't find the correct syntax

Working from memory, I think you need the word "check" before the
opening parenthesis.

Do you use PgAdmin? - You can go through the motions of creating the
constraint there, and see what SQL it generates.

Ray.


--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: Syntax of: alter table ... add constraint ...
Следующее
От: Alexander Farber
Дата:
Сообщение: Re: Syntax of: alter table ... add constraint ...