Re: ON CONFLICT DO SELECT (take 3)

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Viktor Holmberg <v(at)viktorh(dot)net>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Marko Tiikkaja <marko(at)joh(dot)to>, Andreas Karlsson <andreas(at)proxel(dot)se>
Subject: Re: ON CONFLICT DO SELECT (take 3)
Date: 2025-11-25 11:14:08
Message-ID: CAEZATCWsybvZP3ce8rGcVNx-QHuDOJZDz8y=p1SzqHwjRXyV4Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 23 Nov 2025 at 20:34, Viktor Holmberg <v(at)viktorh(dot)net> wrote:
>
> I’ve update the docs in all the cases you mentioned. I’ve also grepped through the docs for “ON CONFLICT” and “DO UPDATE” and fixed upp all mentions where it made sense
>

--- a/doc/src/sgml/ref/create_table.sgml
+++ b/doc/src/sgml/ref/create_table.sgml
@@ -1380,7 +1380,7 @@ WITH ( MODULUS <replaceable
class="parameter">numeric_literal</replaceable>, REM
clause. <literal>NOT NULL</literal> and
<literal>CHECK</literal> constraints are not
deferrable. Note that deferrable constraints cannot be used as
conflict arbitrators in an <command>INSERT</command> statement that
- includes an <literal>ON CONFLICT DO UPDATE</literal> clause.
+ includes an <literal>ON CONFLICT DO UPDATE / SELECT</literal> clause.
</para>
</listitem>
</varlistentry>

Actually, a deferrable constraint cannot be used with ON CONFLICT DO
NOTHING either, which makes this a pre-existing documentation bug,
that should be fixed and back-patched separately as follows:

- includes an <literal>ON CONFLICT DO UPDATE</literal> clause.
+ includes an <literal>ON CONFLICT</literal> clause.

In addition, I think we should change the word "arbitrators" to
"arbiters". It means pretty-much the same thing, but the latter is the
term used everywhere else.

I'll take care of that separately, so the above diff won't be needed
in this patch.

Regards,
Dean

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Soumya S Murali 2025-11-25 11:28:49 Re: Checkpointer write combining
Previous Message Daniel Gustafsson 2025-11-25 10:51:55 Re: BUG #19095: Test if function exit() is used fail when linked static