Re: INSERT ... RETURNING

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: omar(at)tinysofa(dot)org
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: INSERT ... RETURNING
Date: 2005-07-05 15:49:05
Message-ID: 22333.1120578545@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

omar(at)tinysofa(dot)org writes:
> Attached is a patch (by Gavin Sherry, fixed up to apply to 8.1 by me) that
> implements INSERT ... RETURNING functionality.

> It does work for the common case of RETURNING the value of a serial/sequence
> column, but gets confused when returning results out-of-order (CREATE TABLE x
> (a int, b int), INSERT ... RETURNING b, a) and doesn't let you specify the same
> column multiple times (INSERT ... RETURNING b, b). These will be addressed
> soon.

This is pretty considerably shy of what I thought had been agreed to
anyway:

- should allow expressions not only column names

- should work for UPDATE and DELETE too

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-07-05 15:54:47 Re: [PATCHES] Disable page writes when fsync off, add GUC
Previous Message Tom Lane 2005-07-05 15:40:11 Re: Python setof patch