Re: BUG #4141: Aliases in rules vanished, but they work - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #4141: Aliases in rules vanished, but they work
Date
Msg-id 24870.1209851533@sss.pgh.pa.us
Whole thread Raw
In response to BUG #4141: Aliases in rules vanished, but they work  ("Mathias Seiler" <mathias.seiler@gmail.com>)
List pgsql-bugs
"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

pgsql-bugs by date:

Previous
From: "Mathias Seiler"
Date:
Subject: BUG #4141: Aliases in rules vanished, but they work
Next
From: "Lee Ottaway"
Date:
Subject: BUG #4142: pg_dump will not work