Jaime Casanova wrote:
> - why you need a node InsertReturning (see nodeInsertReturning.c) at all?
>
I couldn't come up with a better way to do this.
> and it crashes for triggers (example using regression's int4_tbl)
>
Right. I never tested this with triggers. The trigger tuple slot isn't
allocated in InitPlan(). Seems to be one of the many places where the
code isn't aware that there can be a non-top-level DML statement. Thanks
for testing.
Regards,
Marko Tiikkaja