Re: update behavior

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: update behavior
Date: 2025-06-19 18:29:29
Message-ID: 1483328.1750357769@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Scott Ribe <scott_ribe(at)elevated-dev(dot)com> writes:
> On Jun 19, 2025, at 11:39 AM, Scott Ribe <scott_ribe(at)elevated-dev(dot)com> wrote:
>> Wait, should suppress_redundant_updates_trigger be used even in this case? Would it suppress the update before the constraint checks and invocation of the ON CONFLICT clause???

> Or no, duh, this starts with an INSERT where that won't be run, there is no UPDATE until after the constraint violation, but then at that point it would suppress the update?

I believe we fire ON UPDATE triggers when an INSERT ON CONFLICT
takes an UPDATE action, so it should do what you want. The
overhead tradeoff is yours to make.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Valere Binet 2025-06-20 15:35:25 FATAL: connection requires a valid client certificate
Previous Message Ron Johnson 2025-06-19 18:06:08 Re: update behavior