Tom,
> Josh, this *is* documented; see the CREATE RULE reference page for full
> details, and there's at least passing references here:
> http://developer.postgresql.org/pgdocs/postgres/rules-update.html#RULES-UPD
>ATE-VIEWS
Yeah, it's just hard to find since it's buried in an offhand example in a
subsection which is 5 pages long, and the necessity to match up columns and
data types in order is not clearly explained. I've submitted what I believe
are improvements.
I'll note that we currently prevent adding RETURNING to a *conditional* DO
INSTEAD rule. This means that if we have a conditional DO INSTEAD rule which
inserts into a different table than the final unconditional rule, we'll be
RETURNING wrong or empty values. Mind you, that's a pretty extreme corner
case.
--
Josh Berkus
PostgreSQL @ Sun
San Francisco