Bible Notes Online - Psalms 17 - ESV
Commentary

Prayer to God, matched with a self-disciplined and committed life. The context is David fleeing from Saul, he prays confidently for vindication from God.

v1-2: David, being a man of integrity, looked to God to vindicate him; he would not seek to manipulate circumstances to his own ends.

v3-5: A life of integrity, in contrast the many around him.

"I have resolved", like Daniel, a conscious decision to do the right thing, to obey God. He made a commitment to godliness in the midst of temptation. David had sought a clear conscience, having resolved not to sin with his words. He had kept himself from the wicked ways of the violent, trusting himself to God, relying on the word of God. A life of integrity is not something we slip into. We have all the resources of God, but we must still exercise faith, decide to obey, trusting in Him.

v6: A life of integrity is a life of prayer, this is devotion and delight, rather than duty and obligation. We call and He answers. Again, we have confidence in God.

v7-9: Particular prayer, seeking God's protection from wicked men. A righteous man necessarily finds conflict from those around him. The wicked do "assail" the righteous.

v10-12: The godly man feels vulnerable to the schemes of the wicked, who are many and stronger, Ps 18.17; 142.6.

v13-14: God's deliverance brings down the wicked, and saving His own. The wicked have had their reward (Matt 6.16), finding riches in this life, but that is all they have.

The prayer here is that they will suffer "in this life," thus providing a warning and testimony to others.

v15: Spiritual desire, for a likeness to Christ, Job 19.27; 1 John 3.2-3.