Re: can a insert with a returning clause be subquery ?

From: Adrian Klaver <aklaver(at)comcast(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Cc: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, chrisj <chrisj(dot)wood(at)sympatico(dot)ca>
Subject: Re: can a insert with a returning clause be subquery ?
Date: 2008-02-03 00:40:55
Message-ID: 200802021640.56174.aklaver@comcast.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Saturday 02 February 2008 4:12 pm, Jonah H. Harris wrote:
> On Feb 2, 2008 6:22 PM, chrisj <chrisj(dot)wood(at)sympatico(dot)ca> wrote:
> > I know I could do this easily with a stored proc,
> > but it seems like an obvious use of the returning clause
> >
> > Am I missing some syntax error
>
> Nope, you're not missing anything. When I initially wrote this for
> Postgres, it didn't support all cases; including the one you're
> running into. It's not extremely difficult to extend, but as there
> are so few people asking for this functionality, no one has found it
> important enough to warrant extension. Perhaps I'll get to it for
> 8.4.

Would this be a variation of this item from the TODO:

* Allow INSERT/UPDATE ... RETURNING inside a SELECT 'FROM' clause

http://archives.postgresql.org/pgsql-general/2006-09/msg00803.php
http://archives.postgresql.org/pgsql-hackers/2006-10/msg00693.php

--
Adrian Klaver
aklaver(at)comcast(dot)net

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jonah H. Harris 2008-02-03 01:27:23 Re: can a insert with a returning clause be subquery ?
Previous Message Jonah H. Harris 2008-02-03 00:12:32 Re: can a insert with a returning clause be subquery ?