Re: [SQL] checking data integrity in a recursive table

2003-01-30 Thread Bruce Momjian
Luke Pascoe wrote: > Hi, I have a table that references itself to create a tree-like structure, > eg: > CREATE TABLE tree ( > id SERIAL NOT NULL, > name VARCHAR(255) NOT NULL, > parent INT NULL, > customer IN NOT NULL, > CONSTRAINT parent_key... >

[SQL] checking data integrity in a recursive table

2003-01-28 Thread Luke Pascoe
Hi, I have a table that references itself to create a tree-like structure, eg: CREATE TABLE tree ( id SERIAL NOT NULL, name VARCHAR(255) NOT NULL, parent INT NULL, customer IN NOT NULL, CONSTRAINT parent_key... CONSTRAINT customer_fk FOREIGN