View Single Post

   
  #2 (permalink)  
Old 05-05-2008, 05:52 AM
Tom Lane
 
Posts: n/a
Default Re: BUG #4141: Aliases in rules vanished, but they work

"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

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply With Quote