PostgreSQL 9.5: Insert IF not Exists, Update IF Exists ...
After a long time of waiting, PostgreSQL 9.5 introduced INSERT ON CONFLICT [DO UPDATE] [DO NOTHING]. This option basically helps to perform DML actions like, Insert IF not Exists, Update IF Exists. Previously, we have to use upsert or merge statement to do this kind of operation. I have also published an article on it.
DA: 1 PA: 94 MOZ Rank: 65