Hi, On 2020-11-23 19:44:37 -0300, Alvaro Herrera wrote: > I was contemplating commands/trigger.c this morning (after Heikki split > copy.c) thinking about the three pieces embedded in there -- one > catalog/pg_trigger.c, one in executor (execTrigger.c?) and what seems a > very small piece to remain where it is.
One thing that's not clear enough in general - at least in my view - is what belongs into executor/ and what should be somewhere more general. E.g. a lot of what I assume you would move to execTrigger.c is not just used within the real executor, but also from e.g. copy. There's plenty pre-existing examples for that (e.g. tuple slots), but I wonder if we should try to come up with a better split at some point. Oh, and definitely +1 on splitting trigger.c. Wonder if the the trigger queue stuff, and the directly executor interfacing functions should be split again? It seems to me the trigger queue details are isolated enough that that could come out clean enough. - Andres