why doesn't insert into foo delete from bar returning baz work? - Mailing list pgsql-general

From Palle Girgensohn
Subject why doesn't insert into foo delete from bar returning baz work?
Date
Msg-id 784F667A94DB68379ECD0E56@mangostan.pingpong.net
Whole thread Raw
Responses Re: why doesn't insert into foo delete from bar returning baz work?
Re: why doesn't insert into foo delete from bar returning baz work?
List pgsql-general
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?

Cheers
Palle


pgsql-general by date:

Previous
From: Thom Brown
Date:
Subject: Re: reducing postgresql disk space
Next
From: Steve Crawford
Date:
Subject: Re: reducing postgresql disk space