Postgres syntax error while using insert on conflict – Debian
Given a table CREATE TABLE balances ( username varchar(255) NOT NULL, currency varchar(255) NOT NULL, balance numeric NULL, CONSTRAINT balances_pkey PRIMARY KEY (username, currency) ); After attempting CREATE OR REPLACE FUNCTION merge_balance(username varchar(255), currency varchar(255), to_add numeric) RETURNS void AS…