How to do an =ANY(SELECT...query in postgresql?
Unfortunately = ANY (array) only works with an array literal on the right hand side, not a sub-select.

You need to "normalize" your de-normalized model, using unnest():

SELECT latitude, longitude 
FROM userloc 
WHERE id IN (SELECT unnest(interested) 
             FROM donedeals 
             WHERE deals_id = 64);


If deals_id is unique in the donedeals table, another option is to "convert" the id on the left side to an array and then use the "is contained by" operator: &lt;@: 

SELECT latitude, longitude 
FROM userloc 
WHERE array[id] &lt;@ (SELECT interested 
                    FROM donedeals 
                    WHERE deals_id=64 );


Not sure which one would be faster. You will need to check the execution plan.