Re: INSERT/UPDATE ... RETURNING

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: INSERT/UPDATE ... RETURNING
Date: 2003-04-28 14:04:42
Message-ID: 5.1.0.14.0.20030428235658.05981bb0@mail.rhyme.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 07:37 PM 28/04/2003 +1000, Gavin Sherry wrote:
>Oracle is one of the only commercial
>databases supporting this functionality.

DecRDB does too; it restricts update...returning to only return one row,
and throws an error if more than one row is updated. It covers 95% of
cases, but returning multiple rows might be nice.

>3) Inherited updates affecting multiple tables
>
>Seems that it would be the right thing to do to allow returning of
>inherited rows, but it might be a bit painful to implement. Ideas?

My preference would be to return all rows that were affected.

>4) Handling rule cases
>
>Seems reasonable to allow RETURNING when the query is re-written to a
>single query and that the operation is not transformed.

The main thing that I think you need to cover is to ensure that common
implementations of updateable views are supported in a reasonable way.
Which this sounds like it does.

----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 03 5330 3172 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-04-28 14:18:25 Re: INSERT/UPDATE ... RETURNING
Previous Message Jan Wieck 2003-04-28 11:18:55 Re: INSERT/UPDATE ... RETURNING