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