John Gill's Exposition of the Whole Bible
Psalms 31:19
[O] how great [is] thy goodness,.... Not the natural and essential goodness of God; for though that is large and abundant, yea, infinite, as every perfection of his is, yet it cannot with propriety be said to be laid up and wrought out; but rather the effects of his goodness, and not those which appear in Providence, for they, though very large and plenteous, are common to all, and are not restrained to them that fear the Lord, and trust in him; but such as are displayed in a way of special grace and favour to his own people, and which the psalmist saw his interest in and was affected with; and which supported his faith under his present troubles, and appeared to be so great, both for quality and quantity, that he could not well say how great the blessings of his goodness were;
which thou hast laid up for them that fear thee; both grace and glory; the blessings of grace were laid up in God's heart, in his thoughts and purposes, from everlasting; and in Christ, in whom the fulness of all grace dwells; he was loaded with the blessings of goodness, and his people were blessed in him with all spiritual blessings, and had all grace given them in him before the world was; and these were likewise laid up in the covenant of grace, ordered in all things, and sure; eternal glory is the hope and crown of righteousness laid up in heaven, where it is reserved for the saints, who are heirs of it: and the laying up of all this goodness shows it to be a treasure, riches of grace, and riches of glory; and that it is an hidden treasure, and riches of secret places, which are out of the view of carnal men, and not perfectly seen and enjoyed by the people of God themselves as yet; and also that it is safe and secure for them, and can never be lost; and it expresses the paternal care of God, his great love and affection for them, to lay up so early so much goodness for them: and this is said to be "for them that fear [him]"; not naturally, but by his grace; for the fear of God is not in man naturally, but is put there by the grace of God; and such who have it are those who are brought to a true sight and sense of sin, so as to loathe it and forsake it; for the fear of the Lord is to hate evil, and by it men depart from it, and because of it cannot sin as others do; such have an humble sense of themselves, their own insufficiency and weakness, and trust in the grace of God and righteousness of Christ; they have a filial reverence of God, and worship him in spirit and in truth: but now this fear of the Lord is not the cause of goodness being laid up for them, for that only is the will of God; and besides the fear of God is a part of the goodness which is laid up in promise in the covenant of grace, Jeremiah 32:39; and it is the goodness of God displayed in the blessings of it, such as pardon of sin, c. which influences, promotes, and increases the fear of God, Hosea 3:5 but, goodness being manifested to and bestowed upon them that fear the Lord, it appears eventually to be laid up for them;
[which] thou hast wrought for them that trust in thee before the sons of men! by which may be meant the work of redemption, in which the goodness of God greatly appears; in calling and appointing Christ unto it, in sending him to effect it, in strengthening him as man and Mediator to do it; and in the work itself, in which many things are wrought, the law is fulfilled, justice satisfied, a righteousness brought in, peace made, pardon procured, and everlasting salvation obtained. And whereas this is said to be "wrought for them that trust in" the Lord, it is not to be understood as if trusting in the Lord was the cause of this work being wrought out, which is the love of God and grace of Christ; but inasmuch as those that trust in the Lord have openly an interest in redemption, and they that believe in Christ shall be saved; therefore it clearly appears in the issue of things to be wrought out for them. The phrase "before the sons of men", may be connected either with the goodness wrought, and so signifies that the work of redemption was done in a most public manner, openly before men, even the enemies of God's people; nor was it in the power of men and devils to hinder it; or else with trusting in the Lord, and so is expressive of a public profession of faith and confidence in the Lord before men, which ought to be done: moreover this goodness wrought may include the good work of grace upon the soul; and the Lord's fulfilling the good pleasure of his goodness in the hearts of his people, and the work of faith with power on them; and also the many deliverances of them out of afflictions and temptations, and the many salvations from their enemies he works for them in the earth, before the sons of men.