Psalm 23 (Greek numbering: Psalm 22) is the 23rd psalm in the Old Testament Book of Psalms. The writer describes God as his shepherd. The text is often alluded to in popular media and has been set to music many times.
The Lord is my shepherd; I shall not want.
He maketh me to lie down in green pastures: he leadeth me beside the still waters.
He restoreth my soul: he leadeth me in the paths of righteousness for his name's sake.
Yea, though I walk through the valley of the shadow of death, I will fear no evil: for thou art with me; thy rod and thy staff they comfort me.
Thou preparest a table before me in the presence of mine enemies: thou anointest my head with oil; my cup runneth over.
Surely goodness and mercy shall follow me all the days of my life: and I will dwell in the house of the Lord for ever.
Psalm 23 portrays God as a good shepherd, feeding (verse 1) and leading (verse 3) his flock. The "rod and staff" (verse 4) are also the implements of a shepherd. Some commentators see the shepherd imagery pervading the entire psalm. It is known that the shepherd is to know each sheep by name, thus when God is given the analogy of a shepherd, he is not only a protector but also the caretaker. God, as the caretaker, leads the sheep to green pastures (verse 2) and still waters (verse 2) because he knows that each of his sheep must be personally led to be fed. Thus, without its Shepherd, the sheep would die either by a predator or of starvation, since sheep are known for their helplessness without their shepherd.
J. Douglas MacMillan argues that verse 5 ("Thou preparest a table before me") refers to the "old oriental shepherding practice" of using little raised tables to feed sheep. Similarly, "Thou anointest my head with oil" may refer to an ancient form of backliner – the oil is poured on wounds, and repels flies. MacMillan also notes that verse 6 ("Goodness and mercy shall follow me") reminds him of two loyal sheepdogs coming behind the flock.
John Ellinwood argues that in verses 4 and 5 King David acknowledges God's protection in expeditions and in battles. "Thou preparest a table before me in the presence of mine enemies" refers to the sober raucous dinner before major battles. These were raucous in order to demoralize hostiles camped within earshot, and (only) the king ate from a table. "Thou anointest my head with oil" because tomorrow this ceremony might be impossible. After each victory there was no longer a need for sobriety, so "my cup runneth over." The king's lyricist wisely shortened these military verses for balance. Also in Psalm 18 David mentions God's protection in battle. [13].