in reply to Re^2: [OT] SQL "on duplicate key" custom action
in thread [OT] SQL "on duplicate key" custom action

No, sorry - I don't have a tested version, and I'm not on the machine where I did the searches.

I worked from the Postgres 12 documentation and some Stackoverflow response, but I don't find them now :( I think it should be a before update trigger and the statement would be insert or update maybe. But again, I didn't test any of this, sorry.