Re: CHECK col A not NULL if col B='x' - Mailing list pgsql-sql

From Tom Lane
Subject Re: CHECK col A not NULL if col B='x'
Date
Msg-id 20207.1096410990@sss.pgh.pa.us
Whole thread Raw
In response to Re: CHECK col A not NULL if col B='x'  (T E Schmitz <mailreg@numerixtechnology.de>)
List pgsql-sql
T E Schmitz <mailreg@numerixtechnology.de> writes:
> I noticed a table constraint can be added via ALTER TABLE. Is it correct 
> that a column constraint cannot be added via the ALTER TABLE other than 
> by dropping and adding the column? (I am using psql 7.4.2.)

There is no difference between table and column constraints in PG.  Just
write it as a table constraint in ALTER TABLE.
        regards, tom lane


pgsql-sql by date:

Previous
From: Paul Thomas
Date:
Subject: Re: Doubt
Next
From: Achilleus Mantzios
Date:
Subject: Re: FOREIGN KEY and AccessExclusiveLock