I have preached righteousness— The person speaking here declares that he has done what God required. If we understand it of David, the benefits and mercies which God had vouchsafed to him and his people must be meant by righteousness; but if of Christ, as seems most proper, then it must refer to the righteousness of God revealed by faith, and made known by Jesus Christ to his church.
Related Commentaries of Psalms 40:9
Psalms 40:9
9 I have preached righteousness in the great congregation: lo, I have not refrained my lips, O LORD, thou knowest.