Re: Using results from INSERT ... RETURNING

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: Using results from INSERT ... RETURNING
Дата
Msg-id 20091004172439.GE4964@fetter.org
обсуждение исходный текст
Ответ на Re: Using results from INSERT ... RETURNING  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Using results from INSERT ... RETURNING  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Sun, Oct 04, 2009 at 01:16:50PM -0400, Tom Lane wrote:
> Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi> writes:
> > If I understood you correctly, this would imply that you wouldn't
> > be able to do for example:
> 
> > INSERT INTO foo
> > WITH t AS ( DELETE FROM bar RETURNING * )
> > SELECT * FROM t;
> 
> Um ... forget what I said --- not enough caffeine yet, apparently.
> 
> Yeah, rewrite rules are going to be a *serious* stumbling block to
> this whole concept.

> Maybe we should just punt the project until we have a clear idea of
> how to do that.

Maybe rewrite rules just don't fit with this feature, and should cause
an error.  We have other things that don't work together, and the
world hasn't ended yet.

This leads me to another Modest Proposal, which I'll detail in another
post.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Using results from INSERT ... RETURNING
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Using results from INSERT ... RETURNING