postgresql extract days from interval