Concept Flow - INSERT ON CONFLICT (upsert)
Start INSERT
Check for conflict on unique key
Run DO UPDATE
Finish
When inserting a row, PostgreSQL checks if a conflict occurs on a unique key. If yes, it updates the existing row; if no, it inserts the new row.
