I have two tables in database:
CREATE TABLE items( id SERIAL PRIMARY KEY, ... some other fields );
This table contains come data row with
SELECT t.* FROM unnest(ARRAY[1,2,3,2,3,5]) item_id LEFT JOIN items t on t.id=item_id
The above query select items from items table with ids: 1,2,3,2,3,5 in that order.
items