Re: A problem about alter table

From: Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com>
To: jack <datactrl(at)tpg(dot)com(dot)au>, pgsql-sql(at)postgresql(dot)org
Subject: Re: A problem about alter table
Date: 2003-01-07 15:07:26
Message-ID: 20030107150726.8955.qmail@web20802.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

--- jack <datactrl(at)tpg(dot)com(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2003-01-07 15:27:49 Re: [PERFORM] 7.3.1 index use / performance
Previous Message Ron Peterson 2003-01-07 14:57:45 Re: insert rule doesn't see id field