While I absolutely believe in the preservation of the Word of God (Matthew 5:18), I don’t believe Psalm 12:7 is the best verse to use in support of that doctrine. The only commentators I find who use this verse as a proof text are using it to support the preservation of the KJV in opposition to the multitudinous newer translations that have flooded the English speaking nations since Westcott & Hort published their Greek New Testament in 1881.
Whenever doctrinal questions come up that are directly related to modern Bible translation, I like to look at the historic commentaries that pre-date Westcott & Hort. Many commentators since the early 1900’s have their interpretation colored by their Bible translation bias (either for good or bad). Before Bible translation arguments became so prevalent in the English speaking world, commentaries seem to be much cleaner and more direct to the passage in question.
When you read commentators on Psalm 12 that were published PRE Westcott & Hort it is virtually universal that they believed the context is calling for the preservation of the saints. It’s not until after the Bible translation battles began in English speaking nations do you find commentators (Pro-KJV) who teach that the verse is dealing with preservation of “The words of the LORD.”
Please take a look at this sampling of early commentators:
Agustine of Hippo (354-430) – “You, O Lord, shall preserve us, and keep us from this generation to eternity Psalm 11:7 [12:7]: here as needy and poor, there as wealthy and rich.”
John Calvin (1509-1564)– “Thou wilt keep them, namely, thy words; but this does not seem to me to be suitable. David, I have no doubt, returns to speak of the poor, of whom he had spoken in the preceding part of the psalm. With respect to his changing the number, (for, he says first, Thou wilt keep them, and, next, Thou wilt preserve him” - NOTE: Calvin is the only PRE Westcott & Hort commentators I found to even refer to the possibility of v.7 referring to preservation of the words of God. But even he discounts that view.
Matthew Henry (1662-1714) – “Thou shalt preserve them from this generation for ever. This intimates that, as long as the world stands, there will be a generation of proud and wicked men in it, more or less, who will threaten by their wretched arts to ruin religion, by wearing out the saints of the Most High, Dan. 7:25 . But let God alone to maintain his own interest and to preserve his own people. He will keep them from this generation, (1.) From being debauched by them and drawn away from God, from mingling with them and learning their works. In times of general apostasy the Lord knows those that are his, and they shall be enabled to keep their integrity. (2.) From being destroyed and rooted out by them. The church is built upon a rock, and so well fortified that the gates of hell shall not prevail against it. In the worst of times God has his remnant, and in every age will reserve to himself a holy seed and preserve that to his heavenly kingdom. In singing this psalm, and praying it over, we must bewail the general corruption of manners, thank God that things are not worse than they are, but pray and hope that they will be better in God’s due time.”
John Gill (1697-1771) – “that is, every one of the poor and needy, from the wicked generation of men in which they live, from being corrupted or intimidated by them: and who are described in the beginning of the psalm.”
Keil & Delitzsch (Keil 1807-1888; Delitzsch 1813-1890) – “the suffix ennu in Psalm 12:8 (him, not: us, which would be pointed תצרנוּ, and more especially since it is not preceded by תשׁמרנוּ) refers back to the man who yearns for deliverance mentioned in the divine utterance, Psalm 12:6. The “preserving for ever” is so constant, that neither now nor at any future time will they succumb to this generation. The oppression shall not become a thorough depression, the trial shall not exceed their power of endurance.
Alexander MacLaren (1826-1910) “The last turn of the psalm builds hope on the pure words just heard from heaven. When God speaks a promise, faith repeats it as a certitude and prophesies in the line of the revelation. "Thou shalt" is man's answer to God's "I will." In the strength of the Divine word, the despondency of the opening strain is brightened. The godly and faithful shall not "cease from among the children of men," since God will keep them; and His keeping shall preserve them. "This generation" describes a class rather than an epoch. It means the vain talkers who have been sketched in such dark colours in the earlier part of the psalm. These are "the children of men" among whom the meek and needy are to live, not failing before them because God holds them up. This hope is for the militant Church, whose lot is to stand for God amidst wide-flowing evil, which may swell and rage against the band of faithful ones, but cannot sweep them away. Not of victory which annihilates opposition, but of charmed lives invulnerable in conflict, is the psalmist's confidence. There is no more lamenting of the extinction of good men and their goodness, neither is there triumphant anticipation of present extinction of bad men and their badness, but both are to grow together till the harvest.”
So, while I agree in the preservation of God's Word, I don't think Psalm 12:7 is the best passage to use as a proof text for that doctrine.