Re: CTEs modifying the same table more than once

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: Pantelis Theodosiou <ypercube(at)gmail(dot)com>, pgsql-docs(at)postgresql(dot)org
Subject: Re: CTEs modifying the same table more than once
Date: 2016-10-01 11:22:15
Message-ID: 3a2cae10-2b5a-4f15-e257-0c985e423f0e@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On 2016-10-01 13:13, Pantelis Theodosiou wrote:
> I answered that this is unpredictable behaviour but the docs state only the
> update-update and update-delete cases explicitly and the general wording is
> about 2 updates.

It's documented[1] behavior:

"All the statements are executed with the same snapshot (see Chapter
13), so they cannot "see" one another's effects on the target tables."

.m

[1] https://www.postgresql.org/docs/current/static/queries-with.html

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Pantelis Theodosiou 2016-10-01 11:37:18 Re: CTEs modifying the same table more than once
Previous Message Pantelis Theodosiou 2016-10-01 11:13:22 CTEs modifying the same table more than once