Tom Lane <t...@sss.pgh.pa.us> wrote: > > [ TRIGGER WHEN patch ] > Applied with assorted revisions. AFAICT the system column issue is only > a problem for NEW references in BEFORE triggers --- those columns do > read correctly in OLD, and all the time in AFTER triggers. I revised > the parsing logic to enforce that. The patch also missed establishing > dependencies for stuff referenced in the WHEN expression, and there were > a few other minor problems.
Thanks for your fix. >> * Keep the expression in nodeToString string form within the TriggerDesc >> structure; then it's just one more pfree in FreeTriggerDesc. The main >> disadvantage of this is that we'd have to repeat stringToNode every time >> the trigger is used. I read your fix for the repeated compiling issue is to cache compiled expressions in ResultRelInfo->ri_TrigWhenExprs. So, we can reuse the result of stringToNode when we modify multiple rows in a query. Regards, --- ITAGAKI Takahiro NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers