Re: BUG #17759: MERGE UPDATE statements do not cause generated columns to update - Mailing list pgsql-bugs

From Dean Rasheed
Subject Re: BUG #17759: MERGE UPDATE statements do not cause generated columns to update
Date
Msg-id CAEZATCXkfNb3cJS5nxTb1+r+5XHWO57buOoq3dL1ngMsFwZHBg@mail.gmail.com
Whole thread Raw
In response to BUG #17759: MERGE UPDATE statements do not cause generated columns to update  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
On Wed, 25 Jan 2023 at 13:55, PG Bug reporting form
<noreply@postgresql.org> wrote:
>
> A table with "GENERATED ALWAYS" columns do not appear to get updated when
> the update is done via a MERGE statement.
>

Confirmed here, using 15.1. However, it behaves as expected using the
HEAD of the 15 branch.

I think this got fixed as a side-effect of 3706cc97aa [1], though that
commit doesn't explicitly mention MERGE, it does fix a bug in the way
we identified GENERATED columns that need updating, making that
process much more robust.

If so, the fix should be available in 15.2, in a couple of weeks.

(As an aside, perhaps we should add a regression test case for this.)

Thanks for the report.

Regards,
Dean

[1] https://github.com/postgres/postgres/commit/3706cc97aa



pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Minor difference in behavior between +/-
Next
From: Pete Storer
Date:
Subject: Query execution failure