I use postgreSQL 9.1. In my database there is a table which looks like
id | ... | values ----------------------- 1 | ... | {1,2,3} 2 | ... | {}
You will need to use self LEFT JOIN, like this (also on SQL Fiddle):
LEFT JOIN
SELECT t.id, u.u FROM tab t LEFT JOIN (SELECT id, unnest(vals) u FROM tab) u USING (id);
Note, that for bigger tables query will be performing badly.