Re: why doesn't insert into foo delete from bar returning baz work?

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Palle Girgensohn <girgen(at)pingpong(dot)net>
Cc: pgsql-questions(at)postgresql(dot)org
Subject: Re: why doesn't insert into foo delete from bar returning baz work?
Date: 2010-05-26 15:31:37
Message-ID: AANLkTikOiEYBjgTOALdZOFiVMlPXgYZC0mtAjr1pUF9Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, May 26, 2010 at 11:17 AM, Palle Girgensohn <girgen(at)pingpong(dot)net> wrote:
> While you can do
>
> insert into foo (a, b) select a, b from bar;
>
> and
>
> delete from bar where a=1 returning a, b;
>
> it fails to run
>
> insert into foo (a, b) delete from bar where a=1 returning a, b;
>
> This is not what I would expect. Is there a reason for it not working?

everyone wants this. it was slated to be included for 9.0 but the
patch had to be pulled due to technical problems.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2010-05-26 15:36:01 Re: Transaction with in function
Previous Message Steve Crawford 2010-05-26 15:30:35 Re: reducing postgresql disk space