3 For I acknowledge my transgressions,
And my sin is always before me.
4 Against You, You only, have I sinned, And done this evil in Your sight—
That You may be found just when You speak, And blameless when You judge.
Hold on! He forced himself on a woman, some even say it was rape. He got her pregnant. He tried to get her husband to come off the battlefield and sleep with his wife to cover up his offense. The soldier was so honorable, he refused to sleep with his wife as his men on the field did not have the same luxury. David let's the guy go back to the battlefield with a message for his commander to leave the guy exposed so that he would get killed. Done and done. After the wife finishes her time of mourning, David has her move into his palace with his other wives. Yet he thinks that he has only sinned against God!? It's good to be the king.
I'm sure there are a few exceptions, but I do believe most Christian pastors who are counseling abusive husbands will not tell them, "Well, confess it to God only...Naaah, don't worry about your wife and kids, you only sinned against God, not them."
Christ teaches us to be reconciled with those who have something against us. That is Christian doctrine. This is a great prayer, but it has to be read in light of Christ's teachings. In this case, we can know David was wrong. He did not only sin against God. He needed to confess to Bathsheba and her husband's family and his army and his commander and his nation.
Not everything biblical is Christian.
This is part 17 of the series, Not everything Biblical is Christian. Part one points out that the words of Satan recorded in the Bible are not Christian doctrine. Part two shows the Sermon on the Mount overruling the cursing of enemies exhibited in Psalm 137. Parts three and four show Moses getting overruled by Ezekiel and Jesus. Part five merely brushes the concept of source criticism. Part six looks at the Old Testament application in the early church: a brief summary of the book of Acts. Part seven looks at how the church has worked this out regarding slavery. Part eight, showed one example of how an unchristian part of the Bible helps tell the Christian story. Part nine asks who would Jesus hate? Part 10 discusses women as Biblically approved spoils of war. Part 11 discusses divorce. Part 12 discusses the imposition of Bronze Age social constructs onto our diverse and complex modern world. Part 13 discusses women as property in the Biblical world. Part 14 discusses dehumanization of people with Biblical support. Part 15 discusses the evangelical culture that tends to proclaim the terrible day of the Lord is around the next corner. Part 16 shows how the end of the book of Job overrules 90% of the soliloquies in the book.