Curt Sampson <cjs@cynic.net> writes:
> CREATE VIEW test AS ...
> CREATE RULE test_insert AS
>     ON INSERT TO test
>     DO  ...
> INSERT INTO test VALUES (1, 'one', 'onemore');
> ERROR:  Cannot insert into a view without an appropriate rule
> What am I doing wrong here? Is there a bug?
Make that "ON INSERT DO INSTEAD".  As coded, the rule leaves the
original insertion into the view still active.
Perhaps the error message could be phrased better --- any thoughts?
        regards, tom lane