On Insert: column reference “score” is ambiguous

On the right side of the = in the set clause, there are two possibilities for score: EXCLUDED.score and word_relations.score. The former is a way of accessing the value being inserted; the latter a way of accessing the value stored in the row.

I would write this as:

ON CONFLICT (word1_id, word2_id) DO
    UPDATE SET score = word_relations.score + EXCLUDED.score

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)