Postgres har ingen MERGE erklæring:
https://www.postgresql.org/docs/current/static /sql-commands.html
Brug INSERT ON CONFLICT DO i stedet:
https://www.postgresql.org/docs/current/static /sql-insert.html
Der er en vis bevægelse i retning af MERGER udsagn, men det vil ikke nødvendigvis være noget, du forventer:
https://wiki.postgresql.org/wiki/SQL_MERGE