Re: Writeable CTEs and side effects

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Writeable CTEs and side effects
Дата
Msg-id b42b73150910080854u38547aa1u4c5ee9b85596102e@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Writeable CTEs and side effects  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Writeable CTEs and side effects
Re: Writeable CTEs and side effects
Список pgsql-hackers
On Thu, Oct 8, 2009 at 6:52 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> up to the main query.  For what may turn out to be pretty common uses
> cases like WITH tuples AS (DELETE FROM big_table_1 RETURNING ...)
> INSERT INTO big_table_2 ... this is going to suck pretty bad.  I

Is the above form:

with x as (delete .. returning *) insert into y select * from x

going to be allowed?  I was informed on irc that it wasn't...it would
have to be written as:

insert into y with x as (delete .. returning *) select * from x

IOW, will WITH be able to terminate in update/insert/delete and not just select?

merlin


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: COPY enhancements
Следующее
От: Robert Haas
Дата:
Сообщение: Re: COPY enhancements