Re: [GENERAL] add constraints to views

2003-09-20 Thread Tom Lane
Andreas Fromm <[EMAIL PROTECTED]> writes: > No, I mean that the view behaves like a table with the same columns as > table, but that restricts to records on wich tag is set. To insert a > record to this "special" table it requires to have field1 set. In other > words: A record of table is a record

[GENERAL] add constraints to views

2003-09-20 Thread Andreas Fromm
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Please consider the following situation. CREATE TABLE test_table ( ~id SERIAL PRIMARY_KEY, ~tag BOOLEAN, ~field1 INTEGER ); CREATE VIEW test_view ( ~SELECT * FROM test_table WHERE tag ); Now I want ad a NOT NULL constraint to the view o