A Commentary, Critical, Practical, and Explanatory on the Old and New Testaments, by Robert Jamieson, A.R. Fausset and David Brown  at sacred-texts.com
psa 17:2This Psalm is termed a prayer because the language of petition is predominant. With a just cause, sincerely presented, the writer prays for a just decision and help and protection. Pleading former mercies as a ground of hope, he urges his prayer in view of the malice, pride, rapacity, and selfishness of his foes, whose character is contrasted with his pious devotion and delight in God's favor. (Psa 17:1-15)
from thy presence--Thy tribunal.
things that are equal--just and right, do Thou regard.
psa 17:3proved . . . visited . . . tried--His character was most rigidly tested, at all times, and by all methods, affliction and others (Psa 7:10).
purposed that, &c.--or, my mouth does not exceed my purpose; I am sincere.
psa 17:4works of men--sinful practices.
by the word of thy lips--as a guide (Psa 119:9, Psa 119:11, Psa 119:95).
psa 17:5May be read as an assertion "my steps or goings have held on to Thy paths."
psa 17:6wilt hear me--that is, graciously (Psa 3:4).
psa 17:7Show--set apart as special and eminent (Exo 8:18; Psa 4:3).
thy right hand--for Thy power.
psa 17:8Similar figures, denoting the preciousness of God's people in His sight, in Deu 32:10-11; Mat 23:37.
psa 17:9compass me--(compare Psa 118:10-12).
psa 17:10enclosed . . . fat--are become proud in prosperity, and insolent to God (Deu 32:15; Psa 73:7).
psa 17:11They pursue us as beasts tracking their prey.
psa 17:12The figure made more special by that of a lion lurking.
psa 17:13disappoint--literally, "come before," or, "encounter him." Supply "with" before "sword" (Psa 17:13), and "hand" (Psa 17:14). These denote God's power.
psa 17:14men . . . world--all men of this present time. They appear, by fulness of bread and large families, to be prosperous; but (Psa 17:15) he implies this will be transient, contrasting his better portion in a joyful union with God hereafter.