Psalm 30:1 (ESV)

1 I will extol you, O LORD, for you have drawn me up and have not let my foes rejoice over me.

David extolled the virtues of God, because he knew that it was the Lord who had rescued him. Foes refers to those who would have profited from David’s death. He had many enemies who would have rejoiced at his death. The word may also allude to the great enemy, death, and the host of Satan.