David was looking into the future and speaking of the Messiah’s resurrection. He was saying that God would not leave him among the dead or allow his body to rot in the grave.