The heading of the psalm indicates that David wrote it after Doeg the Edomite had informed Saul that David had visited Ahimelech the priest. Saul had regarded the actions of Ahimelech as treason and ordered his death. Saul’s soldiers would not obey this instruction, so he turned to Doeg who then performed this macabre act (1 Sam. 22).
No doubt David was greatly distressed by this unforeseen consequence of his visit to the priest. Yet there was nothing that David could do at that time to Doeg. So he wrote this psalm, which at one level is a poem, but at a higher level it is a pronouncement of Doeg’s fate by one who was a prophet. An important aspect of a prophet’s work was to pass on to others the thoughts and intentions of God. So in this psalm, David is not merely expressing his opinion, he is also stating God’s intentions regarding the wicked man, Doeg.
Verses 1-5 are an assessment of Doeg’s character. He boasted about his sin, probably expressing his opinion that no-one could do anything about his actions (after all, he had the backing of King Saul). Indeed, his past wrong actions only encouraged him to plan more in the future. His words were deceitful and cruel. Yet Doeg had forgotten that God would deal with him and eventually bring his life to an end – the verbs ’snatch’ and ’tear’ depict both Doeg’s unwillingness to leave this life and his complete inability to prevent God bringing his life to an end.
Verses 6-9 describe the response of God’s people to this act of judgement. Corporately they will respond by fearing the greatness of God and by affirming the weakness of Doeg (there is such a response as righteous scorn). In particular, they will realise the folly of Doeg in refusing to find real safety in the Lord – because Doeg trusted in his own achievements, he was actually trusting in what would ultimately destroy him (vv. 6-7).
Individually, David responded to Doeg’s destruction by focussing on the security that comes because of faith in the Lord – an olive tree survives for a long time and is a vivid picture of the security of God’s people; a green olive tree in the house of God is a picture of spiritual fruitfulness. David knew that his God would always show faithful love, and even his removal of the wicked Doeg was an aspect of God’s faithfulness to his cause. Therefore he looked forward to thanking God for his faithful love in the presence of his people (vv. 8-9)
What has this ancient song about an ancient event got to do with us? When we sing it, we do three things. First, we recall God’s faithfulness to his people in the past – after all, we belong to the same family. Second, we function as prophets and predict the dire future of all others who behave like Doeg. Third, we thank God for delivering us from such a fate.