read psalm 12 in context.
To the chief Musician upon Sheminith, A Psalm of David.
The opening of Psalm 12
Help, LORD; for the godly man ceaseth; for the faithful fail from among the children of men. They speak vanity every one with his neighbour: with flattering lips and with a double heart do they speak.
The godly and the faithful have because so scarce, that they don't seem to exist anymore. People speak vanity and with flattering lips and double heart.
The LORD shall cut off all flattering lips, and the tongue that speaketh proud things: Who have said, With our tongue will we prevail; our lips are our own: who is lord over us?
David, still in his prayer, is asking that the Lord cut off those with the flattering lips spoken of in vss 1-2.
For the oppression of the poor, for the sighing of the needy, now will I arise, saith the LORD; I will set him in safety from him that puffeth at him.
The wrong done by the flattering words and vanity. People's words cannot be trusted. The Lord set him in safety(godly from vs 1).
Notice, we are through the first 5 verses. The context has clearly been set, and it isn't about the Bible. It is about the godly man and those that use flattering lips. The Lord will set the godly man in safety.
The words of the LORD are pure words: as silver tried in a furnace of earth, purified seven times.
Opposite to those in verses 1 and 2, the Lord's words are pure. What he says in verse 5 will be true because the Lord doesn't lie.
Again, notice nothing is mentioned yet about the Bible. While the Bible does include Gods words, they are not all of them. The Bible is everything that God wanted us to have, but it didn't record every single word that God has ever said. Not all the conversations between Adam and God are recorded for instance. David is talking about the words that God says and that they are true and pure, not like the ones that speak with flattering words...
Thou shalt keep them, O LORD, thou shalt preserve them from this generation for ever. The wicked walk on every side, when the vilest men are exalted.
To say that David as change the subject just in this one verse doesn't have any contextual support. He is speaking about what he had just said in verse 5, who is speaking about the godly in verse 1. The "them" in the KJV is literally "him." Which could NOT be referring to words as we don't call words by "him." The KJV has them because it is speaking of the plural of the poor and needy which is more than one person. In English, we use the term "them" to refer to more than one person so "him" would be grammatically incorrect even though it would be a literal translation.