Re: Using results from INSERT ... RETURNING

From: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
To: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: PostgreSQL hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Using results from INSERT ... RETURNING
Date: 2009-07-19 14:01:01
Message-ID: 4A63271D.2010601@cs.helsinki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Xin Wang 2009-07-19 14:13:35 Using a C++ library in PostgreSQL
Previous Message Andres Freund 2009-07-19 13:47:19 Re: generic explain options v3 - RR Review