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
bin91urRGXXGs.bin
Description: rule-returning.patch.gz
---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq