How to execute an insert or update operation in postgres 10 ( that not have store procedures)?

it is possible to execute an insert or update operation using only functions in postgres?. I am using version 10.14 that not support store procedures.


You should use INSERT ... ON CONFLICT. It doesn't matter much if you run that from a function or not.