Re: Use ctid in where clause in update from statement - Mailing list pgsql-general

From Thomas Kellerer
Subject Re: Use ctid in where clause in update from statement
Date
Msg-id 1c9e7d1d-ea2e-8f48-7a05-268254a9aad5@gmx.net
Whole thread Raw
In response to Re: Use ctid in where clause in update from statement  (Dirk Mika <Dirk.Mika@mikatiming.de>)
Responses Re: Use ctid in where clause in update from statement
List pgsql-general
Dirk Mika schrieb am 01.07.2019 um 13:18:
> The problem with the INSERT ON CONFLICT is that an insert is tried here first, which may fire triggers.
> 
> In my case there is a fairly expensive INSERT Trigger ON EACH ROW, which I would like to avoid.

The insert trigger will only be fired if an INSERT actually takes place. 

If INSERT ON CONFLICT results in an UPDATE (or a DO NOTHING), no INSERT trigger will be fired.




pgsql-general by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: Use ctid in where clause in update from statement
Next
From: Dirk Mika
Date:
Subject: Re: Use ctid in where clause in update from statement