Re: Allow ON CONFLICT DO UPDATE to return EXCLUDED values - Mailing list pgsql-hackers

From Jim Jones
Subject Re: Allow ON CONFLICT DO UPDATE to return EXCLUDED values
Date
Msg-id b761b218-595f-428f-aeeb-6280e5e16af0@uni-muenster.de
Whole thread Raw
In response to Re: Allow ON CONFLICT DO UPDATE to return EXCLUDED values  (Dean Rasheed <dean.a.rasheed@gmail.com>)
List pgsql-hackers
On 07.07.25 19:52, Dean Rasheed wrote:
> perhaps that should say
>
>     Note that any values that were supplied by defaults, as well as
>     the effects of all per-row BEFORE INSERT triggers are reflected
>     in excluded values, since that may have contributed to the row
>     being excluded from insertion.

+1

IMO a short mention at insert.sgml also wouldn't hurt, e.g.

If the INSERT has an ON CONFLICT DO UPDATE clause, a column name or *
may be qualified using EXCLUDED to return the values that would have
been inserted. These values include any DEFAULT expressions or computed
expressions from the INSERT clause. If there is no conflict, then all
EXCLUDED values will be NULL.

Best, Jim



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: A recent message added to pg_upgade
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Allow parallelism for plpgsql return expression after commit 556f7b7