Re: [SQL] redundancy in CHECK CONSTRAINTs

2005-09-24 Thread Ferindo Middleton Jr
Thank you for your advice, Tom. I've re-done the table in my db using the schema you describe below. The is a need for the id field. Other tables in my applications use it to refer to any one intsystem/extsystem relationship and be able to provide users with one simple number to use to refer to

Re: [SQL] redundancy in CHECK CONSTRAINTs

2005-09-24 Thread Tom Lane
Ferindo Middleton Jr <[EMAIL PROTECTED]> writes: > I have the following table: > CREATE TABLE gyuktnine ( > id SERIAL, > intsystem INTEGER NOT NULL REFERENCES yuksystems(id) CONSTRAINT > int_cannot_equal_ext >CHECK (intsystem != extsystem), >

[SQL] redundancy in CHECK CONSTRAINTs

2005-09-24 Thread Ferindo Middleton Jr
I have the following table: CREATE TABLE gyuktnine ( id SERIAL, intsystem INTEGER NOT NULL REFERENCES yuksystems(id) CONSTRAINT int_cannot_equal_ext CHECK (intsystem != extsystem), extsystem INTEGER NOT NULL REFERENCES yuksystems(id) CONSTR