On 8/15/06, Tom Lane <[EMAIL PROTECTED]> wrote:
But even this seems like it would fail in complicated cases. What if the view is a join, and your ON INSERT rule inserts into two different underlying tables in two commands? If you need fields from both tables to generate a full RETURNING list then there's no apparent way to make it work.
As both methods have the same issue when dealing with complicated (multi-table) inserts, updates, or deletes... I'm pondering how to best combine the tuples in such a way as to generate a full RETURNING list. Maybe it's the flu talking, but is there some way to hack the RETURNINGs into a subselect-like form such that we could combine the multiple values returned from say 2 insert statements into a complete RETURNING list in a single tuple? -- Jonah H. Harris, Software Architect | phone: 732.331.1300 EnterpriseDB Corporation | fax: 732.331.1301 33 Wood Ave S, 2nd Floor | [EMAIL PROTECTED] Iselin, New Jersey 08830 | http://www.enterprisedb.com/ ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings