27 But they of whose iniquities this Psalm speaks, when they had entered into that temporal land of promise, “destroyed not the heathen, which the Lord commanded them”; “but were mingled among the heathen, and learned their works”. “Insomuch that they worshipped their idols, which became to them an offense”. Their not destroying them, but mingling with them, became to them an offense.
28. “Yea, they offered their sons and their daughters unto devils”; “and shed innocent blood, even the blood of their sons and of their daughters, whom they offered unto the idols of Canaan”. That history does not relate that they offered their sons and daughters to devils and idols; but neither can that Psalm lie, nor the Prophets, who assert this in many passages of their rebukes. But the literature of the Gentiles is not silent respecting this custom of theirs. But what is it that follows? “And the land was slain with bloods.” We might suppose that this was a mistake of the writer, and that he had written interfecta for infecta, were it not for the goodness of God, who has willed His Scriptures to be written in many languages; were it not that we see it written as in the text in many Greek copies which we have inspected; “the land was slain with bloods.” What means then, “the land was slain,” unless this be referred to the men who dwelt in the land, by a metaphorical expression....For they themselves were slaying their own souls when they offered up their sons, and when they shed the blood of infants who were far from consent to this crime: whence it is said, “They shed innocent blood.” “The land” therefore “was slain with bloods, and defiled by their works”, since they themselves were slain in soul, and defiled by their works; “and they went a whoring after their own inventions.” By inventions are meant what the Greeks call ἐ πιτηδεύματα: for this word does occur in the Greek copies both in this and a former passage, where it is said, “They provoked Him to anger with their own inventions;” “inventions” in both instances signifying what they had initiated others in. Let no man therefore suppose inventions to mean what they had of themselves instituted, without any example before them to imitate. Whence other translators in the Latin tongue have preferred pursuits, affections, imitations, pleasures, to inventions: and the very same who here write inventions, have elsewhere written pursuits. I chose to mention this, lest the word inventions, applied to what they had not invented, but imitated from others, might raise a difficulty.
29. “Therefore was the wrath of the Lord kindled against His own people”. Our translators have been unwilling to use the word anger, for the Greek θυμὸς; though some have used it; while others translate by “indignation” or “mind.” Whichever of these terms be adopted, passion does not affect God; but the power of punishing has assumed this name metaphorically from custom.
30. “Insomuch that He abhorred His own inheritance; and He gave them over into the hand of the heathen: and they that hated them were lords over them”: “and their enemies oppressed them, and they were brought low under their hands”. Since he has called them the inheritance of God, it is clear that He abhorred them, and gave them over into their enemies' hands, not in order to their perdition, but for their discipline. Lastly, he says, “Many a time did He deliver them.” “But they provoked Him with their own counsels”. This is what he said above, “They did not abide His counsel.” Now a man's counsel is pernicious to himself, when he seeks those things which are his own only, not those which are God's. In whose inheritance, which inheritance He Himself is to us, when He deigns His presence for our enjoyment, being with the Saints, we shall suffer no straitening from the society, by our love of anything as our own possession. For that most glorious city, when it has gained the promised inheritance, in which none shall die, none shall be born, will not contain citizens who shall individually rejoice in their own, for “God shall be all in all.” And whoever in this pilgrimage faithfully and earnestly does long for this society, does accustom himself to prefer common to private interests, by seeking not his own things, but Jesus Christ's: lest, by being wise and vigilant in his own affairs, he provoke God with his own counsel; but, hoping for what he sees not, let him not hasten to be blessed with things visible; and, patiently waiting for that everlasting happiness which he sees not, follow His counsel in His promises, whose aid he prays for in his prayers. Thus he will also become humble in his confessions; so as not to be like those, of whom it is said, “They were brought down in their wickedness.”
Source: The Enarrations, or Expositions, on the Psalms (New Advent)