Disable log ERROR: duplicate key value violates unique constraint Running Postgresql in a better ask for forgiveness than permission mode during the inserts. 

Works great, only problem: The logs are flooded with the following message

duplicate key value violates unique constraint


Is there a possibility to explictly disable this log?
You could use

INSERT ... ON CONFLICT DO NOTHING


and check if a row was inserted or not.