Re: Joins of data-modifying CTE with the target table

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Joins of data-modifying CTE with the target table
Дата
Msg-id 2983382.1681919164@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Joins of data-modifying CTE with the target table  (Alex Bolenok <quassnoi@gmail.com>)
Ответы Re: Joins of data-modifying CTE with the target table  (Alex Bolenok <quassnoi@gmail.com>)
Список pgsql-general
Alex Bolenok <quassnoi@gmail.com> writes:
> I get why it's not working (because the statement is not allowed to see the
> tuples with its own cmin), but I was wondering if it was worth it at least
> to spell it out explicitly in the documentation.

What's not explicit about this?

    The sub-statements in WITH are executed concurrently with each other
    and with the main query. Therefore, when using data-modifying
    statements in WITH, the order in which the specified updates actually
    happen is unpredictable. All the statements are executed with the same
    snapshot (see Chapter 13), so they cannot “see” one another's effects
    on the target tables.

            regards, tom lane



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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: COPY RETURNING?
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Joins of data-modifying CTE with the target table