Tom Lane wrote:
Hm, I've not compared the two versions of the patch, but what I was thinking was that I'd like to get the resultRelation stuff out of EState and have it *only* in the DML nodes. It sounds like you went in the other direction --- what was the reason for that?
I've taken a compromise of that in the writeable CTE code; the DML nodes have the index to the start of their result relation array which is part of estate->es_result_relations. This way the code that currently depends on estate->es_result_relations works normally. Also, we set estate->es_result_relation_info only during ExecInitDml(). I didn't want to break that either. The "index to es_result_relations" is a bit kludgy, but I didn't see any better ways to do this and wanted to move on with the code and not be stuck in a single place for too long. But I'm thinking that this should be part of the writeable CTE patch. Regards, Marko Tiikkaja -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers