In PostgreSQL we have a 'WITH LOCAL CHECK OPTION' statement to enforce the check implemented in the WHERE clause.
For example,
CREATE VIEW HeavyOrders AS
SELECT *
FROM Orders
WHERE Weight > 100
WITH LOCAL CHECK OPTION;
now if we try to insert a raw where Weight < 100 we will get an error:
INSERT INTO HeavyOrders(x, y, z, Weight)
VALUES('a', 'b', 'c', 80);
Is there a way to enforce such a check on a VIEW?