Attached is a draft patch that makes rules support RETURNING as per my
proposal of earlier today, ie, have the rewriter automatically adjust a
RETURNING clause present in an unconditional INSTEAD rule. The core of
the patch is barely twenty lines (the code added to rewriteRuleAction)
--- the rest is error checking to reject invalid rules.
Comments, objections?
regards, tom lane