If I create the following table..
CREATE TABLE foo ( x int );
EXCLUDE the following,
WHERE x = <a duplicate value> (generic unique constraint) WHERE x = <specific value> (type of unique constraint reduce values that aren't specific to null) WHERE x <> ANY OTHER value (EXCLUDE WITH <>)
But, is there a clever way to permit
INSERT INTO foo (x) VALUES (0); INSERT INTO foo (x) VALUES (1);
INSERT INTO foo (x) VALUES (1); INSERT INTO foo (x) VALUES (0);
Or is there a module would otherwise let me do it as a function of the index and not with a trigger.
In summary, you can insert multiple values of 1 (or 0), but upon the first insertion of 1 the file is closed and no further insertion of 0 can be made, but
1 can continue to be inserted.