1 David spoke to Yahweh the words of this song in the day that Yahweh delivered him out of the hand of all his enemies, and out of the hand of Saul:
*Minor differences ignored. Grouped by changes, with first version listed as example.
This song, which is found with scarcely any material variation as Ps. 18, and with the words of this first verse for its title, belongs to the early part of David's reign when he was recently established upon the throne of all Israel, and when his final triumph over the house of Saul, and over the pagan nations 2-Samuel 22:44-46, Philistines, Moabites, Syrians, Ammonites, and Edomites, was still fresh 2 Sam. 21. For a commentary on the separate verses the reader is referred to the commentary on Ps. 18.
David spake unto the Lord the words of this song - This is the same in substance, and almost in words, with Psalm 18:1-50, and therefore the exposition of it must be reserved till it occurs in its course in that book, with the exception of a very few observations, and Dr. Kennicott's general view of the subject.
And David spake unto the LORD the words of this (a) song in the day [that] the LORD had delivered him out of the hand of all his enemies, and out of the hand of Saul:
(a) In token of the wonderful benefits that he received from God.
And David spake unto the Lord the words of this song in the day that the Lord had delivered him out of the hand of all his enemies, and out of the hand of Saul. See Gill on Psalm 18:1.
This chapter is a psalm of praise; we find it afterwards nearly as Psalm 18. They that trust God in the way of duty, shall find him a present help in their greatest dangers: David did so. Remarkable preservations should be particularly mentioned in our praises. We shall never be delivered from all enemies till we get to heaven. God will preserve all his people, 2-Timothy 4:18. Those who receive signal mercies from God, ought to give him the glory. In the day that God delivered David, he sang this song. While the mercy is fresh, and we are most affected with it, let the thank-offering be brought, to be kindled with the fire of that affection. All his joys and hopes close, as all our hopes should do, in the great Redeemer.
The heading is formed precisely according to the introductory formula of the song of Moses in Deuteronomy 31:30, and was no doubt taken from the larger historical work employed by the author of our books. It was probably also adopted from this into the canonical collection of the Psalter, and simply brought into conformity with the headings of the other psalms by the alteration of דּוד וידבּר (and David said) into דּבּר עשׁר לדוד יהוה לעבד ("Of David, the servant of the Lord, who spake:" Eng. ver.), and the insertion of למנצּח ("to the chief musician:" Eng. ver.) at the head (see Delitzsch on the Psalm). "In the day," i.e., at the time, "when Jehovah had delivered him." Deliverance "out of the hand of Saul" is specially mentioned, not because this was the last, but because it was the greatest and most glorious, - a deliverance out of the deepest misery into regal might and glory. The psalm is opened by ויּאמר in both texts.
*More commentary available at chapter level.