Postgres nemá žádné MERGE prohlášení:
https://www.postgresql.org/docs/current/static /sql-commands.html
Použijte INSERT ON CONFLICT DO místo toho:
https://www.postgresql.org/docs/current/static /sql-insert.html
Došlo k určitému pohybu směrem ke MERGER prohlášení, ale nemusí to být nutně co očekáváte:
https://wiki.postgresql.org/wiki/SQL_MERGE