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

From Marko Tiikkaja
Subject Re: Using results from INSERT ... RETURNING
Date
Msg-id 4AC8CC49.5020808@cs.helsinki.fi
Whole thread Raw
In response to Re: Using results from INSERT ... RETURNING  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Using results from INSERT ... RETURNING
List pgsql-hackers
Tom Lane wrote:
> Any given executor run only
> has to think about one type of DML command --- otherwise the executor
> would be broken already, since it takes only one command-type argument.

If I understood you correctly, this would imply that you wouldn't be
able to do for example:

INSERT INTO foo
WITH t AS ( DELETE FROM bar RETURNING * )
SELECT * FROM t;

which is probably the most useful thing you could do with this feature.
Am I misinterpreting what you said?

Regards,
Marko Tiikkaja



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Using results from INSERT ... RETURNING
Next
From: Robert Haas
Date:
Subject: Re: Using results from INSERT ... RETURNING