Re: Using results from INSERT ... RETURNING - Mailing list pgsql-hackers

From Marko Tiikkaja
Subject Re: Using results from INSERT ... RETURNING
Date
Msg-id 4A63271D.2010601@cs.helsinki.fi
Whole thread Raw
In response to Re: Using results from INSERT ... RETURNING  (Jaime Casanova <jcasanov@systemguards.com.ec>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Sampling profiler updated
Next
From: Stefan Kaltenbrunner
Date:
Subject: Re: Review: Revise parallel pg_restore's scheduling heuristic