Search Postgresql Archives

Re: before insert for each row trigger on upsert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/20/20 12:17 PM, Ted Toth wrote:
I'm a little confused why the before insert trigger fires al all but since it does is  there a way to know that an update will occur?

Because ON CONFLICT DO UPDATE is part of an INSERT command.

Basically I don't want the trigger affect the row on update.

Not sure that a BEFORE trigger will work for that anyway as it will not have submitted the data yet for ON CONFLICT resolution.


Ted


--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux