Alexey Grishchenko <agrishche...@pivotal.io> writes: > Any comments on this patch?
I felt that this was more nearly a bug fix than a new feature, so I picked it up even though it's nominally in the next commitfest not the current one. I did not like the code too much as it stood: you were not being paranoid enough about ensuring that the callstack data structure stayed in sync with the actual control flow. Also, it didn't work for functions that modify their argument values (cf the committed regression tests); you have to explicitly save named arguments not only the "args" version, and you have to do it for SRF suspend/resume not just recursion cases. But I cleaned all that up and committed it. > triggers are a bit different - they depend on modifying the global "TD" > dictionary inside the Python function, and they return only the status > string. For them, there is no option of modifying the code to avoid global > input parameters without breaking the backward compatibility with the old > enduser code. Yeah. It might be worth the trouble to include triggers in the save/restore logic, since at least in principle they can be invoked recursively; but there's not that much practical use for such cases. I didn't bother with that in the patch as-committed, but if you want to follow up with an adjustment for it, I'd take a look. regards, tom lane -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers