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
r...@iol.ie

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to