It can seem at times that David’s songs are awfully repetitious. Consider that virtually every one of them represents some adventure David went through or something that left a major impression on him. In this case, we are told that David celebrates delivery from a sticky political situation (1 Samuel 21:10-22:1). Saul was trying to hunt him down and David hardly knew where to run. He ended up carrying the sword of Goliath back to the giant’s home town. Don’t get hung up on the names for the king of Gath. Abimelech seems a hereditary title while Achish is more likely a royal family name. David’s escape was to feign madness in accordance with popular imagination of such things. We suspect Achish was hoping for such an excuse since David was a family friend or sorts.
This is an acrostic psalm as with Psalm 9. The first half is clearly a call to worship with him. A significant number of contemporary worship songs echo the words here because more than one English translation is rather exhilarating. Starting in verse 11, David takes on the role of teacher, pointing out that what humans really need and generally want can be found in conforming to God’s moral character. He notes that it’s not always possible to distinguish between the sinners and the righteous in terms of the risks we all take in our fallen world, but that God delivers His own in the midst of trouble.
We also note that David offers a common figure of speech of not worrying about broken bones. John’s Gospel (19:33) quotes it as oddly fulfilled in the literal with Jesus on the Cross. In the context of John’s writing we realize he isn’t a silly literalist, but simply notes that Jesus is the real fulfillment of Israeli ideals. We note a great many scholars miss the subtlety.