Re: A problem about alter table - Mailing list pgsql-sql

From Jeff Eckermann
Subject Re: A problem about alter table
Date
Msg-id 20030107150726.8955.qmail@web20802.mail.yahoo.com
Whole thread Raw
In response to A problem about alter table  ("jack" <datactrl@tpg.com.au>)
List pgsql-sql
--- jack <datactrl@tpg.com.au> wrote:
> Hi, all
> I'm using postgreSQL 7.2.3. The following statement
> always cuases a parser
> error, "parse error at or near NOT". Please adivse,
> thank you in advance.
> 
> ALTER TABLE _acct_group1
>     ALTER groupkey  SET NOT NULL;
I believe you will need to use:

ALTER TABLE _acct_group1 ADD CONSTRAINT <constraint
name> CHECK groupkey NOT NULL;

I haven't checked that syntax for correctness, but
it's covered in the docs on ALTER TABLE.

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


pgsql-sql by date:

Previous
From: Ron Peterson
Date:
Subject: Re: insert rule doesn't see id field
Next
From: Stephan Szabo
Date:
Subject: Re: [PERFORM] 7.3.1 index use / performance