Re: slightly unexpected result

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Torsten Förtsch <tfoertsch123(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: Re: slightly unexpected result
Date: 2024-01-10 16:18:57
Message-ID: ZZ7Dcc3fN71moe3E@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jan 10, 2024 at 09:06:31AM -0700, David G. Johnston wrote:
> It is mostly documented.
>
> https://www.postgresql.org/docs/current/queries-with.html#
> QUERIES-WITH-MODIFYING
> """
> Only one of the modifications takes place, but it is not easy (and sometimes
> not possible) to reliably predict which one.
> ...
> In particular avoid writing WITH sub-statements that could affect the same rows
> changed by the main statement or a sibling sub-statement. The effects of such a
> statement will not be predictable.
> """
>
> Yes, an error would be nice, but the effort put forth stops at unpredictable,
> and saying just don't do it.

Oh, good to know. :-)

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Barron 2024-01-10 18:47:21 pgAdmin 8.1 install
Previous Message David G. Johnston 2024-01-10 16:06:31 Re: slightly unexpected result