I use postgreSQL 9.1. In my database there is a table which looks like
id | ... | values ----------------------- 1 | ... | {1,2,3} 2 | ... | {}
select id, unnest ( "values" || (array[null]::integer[])[1:(array_upper("values", 1) is null)::integer] ) from "table"