PostgreSQL displays error 42702 with message:
Column reference is ambiguous
when you reference a column without referencing the table it came from, in cases where a column reference could have come from one or more tables.
To fix this, specify the table name prior to the column reference.
For example, the below query might state that the column reference is ambigious because ID might be in the dogList and catList table:
SELECT id, cats, dogs
FROM dogList
JOIN catList
ON dogList.id = catList.column_name;
Remove the ambiguity by referencing the table that contains the ID; example below:
SELECT dogList.id, cats, dogs
FROM dogList
JOIN catList
ON dogList.id = catList.column_name;