"Mathias Seiler" <mathias.seiler@gmail.com> writes:
> postgres=# CREATE RULE foo_delete AS ON DELETE TO foo_view do instead
> postgres-# DELETE FROM foo f where f.id = old.id;
> CREATE RULE
> postgres=# \d foo_view
> View "public.foo_view"
> Column | Type | Modifiers
> --------+---------+-----------
> id | integer |
> bar | text |
> View definition:
> SELECT foo.id, foo.bar
> FROM foo
> LIMIT 10;
> Rules:
> foo_delete AS
> ON DELETE TO foo_view DO INSTEAD DELETE FROM foo
> WHERE f.id = old.id
Hmm, looks like ruleutils.c got overlooked in the patch that added
support for aliases on UPDATE/DELETE target relations. Will fix.
regards, tom lane