17 He has sent down from on high, and has fetched Me: by calling out of the Gentiles for an inheritance “a glorious Church, not having spot, or wrinkle.” “He has taken Me out of the multitude of waters.” He has taken Me out of the multitude of peoples.
18. “He has delivered Me from My strongest enemies”. He has delivered Me from Mine enemies, who prevailed to the afflicting and overturning of this temporal life of Mine. “And from them which hate Me; for they are too strong for Me:” as long as I am under them knowing not God.
19. “They have prevented Me in the day of My affliction”. They have first injured Me, in the time when I am bearing a mortal and toilsome body. “And the Lord has become My stay.” And since the stay of earthly pleasure was disturbed and torn up by the bitterness of misery, the Lord has become My stay.
20. “And has brought Me forth into a broad place”. And since I was enduring the straits of the flesh, He brought Me forth into the spiritual breadth of faith. “He has delivered Me, because He desired Me.” Before that I desired Him, He delivered Me from My most powerful enemies (who were envious of Me when I once desired Him), and from them that hated Me, because I do desire Him.
21. “And the Lord shall reward Me according to My righteousness”. And the Lord shall reward Me according to the righteousness of My good will, who first showed mercy, before that I had the good will. “And according to the cleanness of My hands He will recompense Me.” And according to the cleanness of My deeds He will recompense Me, who has given Me to do well by bringing Me forth into the broad place of faith.
22. “Because I have kept the ways of the Lord”. That the breadth of good works, that are by faith, and the long-suffering of perseverance should follow after.
23. “Nor have I walked impiously apart from My God.” “For all His judgments are in My sight”. “For” with persevering contemplation I weigh “all His judgments,” that is, the rewards of the righteous, and the punishments of the ungodly, and the scourges of such as are to be chastened, and the trials of such as are to be proved. “And I have not cast out His righteousness from Me:” as they do that faint under their burden of them, and return to their own vomit.
24. “And I shall be undefiled with Him, and I shall keep Myself from Mine iniquity”.
Source: The Enarrations, or Expositions, on the Psalms (New Advent)