"A Psalm of David": When did David say this Psalm? When he was going up the ascent of the Mount of Olives and weeping. If he was weeping, why was he singing? And if he was singing, why was he weeping?

Rabbi Abba bar Kahana gave a parable: To what can the matter be compared? To a king who became angry with his son and banished him, and the king sent his pedagogue after him. The pedagogue went after him and found him weeping and singing. The pedagogue said to him, "If you are weeping, why are you singing?

And if you are singing, why are you weeping?" He replied, "I am weeping because I provoked my father, and I am singing because my sentence is not death, and it is not enough for me that he did not kill me, but he sent me to duchies and provinces." Rabbi Yudan said: David said, "Jacob our father fled, as it is said (Hosea 12:13), 'And Jacob fled to the field of Aram.' Moses fled, as it is said (Exodus 2:15), 'And Moses fled from Pharaoh.'

And I too am fleeing like them." He began to say (Psalms 119:52), "I have remembered Your judgments of old, O Lord, and have comforted myself." Another interpretation: When did David say this verse? When he said (2 Samuel 15:14), "And David said to all his servants who were with him in Jerusalem, 'Arise and let us flee.'"

Rav and Rabbi Yudan [interpreted this differently]. Rav said: So that we would not be judged as a city led astray. Rabbi Yudan said: He took the cup to rinse it, and he would not move from there until he had rinsed it. Likewise, when David saw that the Holy One, Blessed be He, had rinsed away his iniquities, he began to sing, "A Psalm of David."

And when did he say thus, as it is written (2 Samuel 15:18), "And all his servants passed by at his side, and all the Cherethites, and all the Pelethites." Rabbi Ivo says: "Cherethites" refers to those who made covenants, and "Pelethites" refers to those who were wondrous in the court of law. And the Rabbis say: They would say something, and there was no one who could expound further after them. (2 Samuel 15:15) "And the king's servants said to him, 'Behold, your servants are ready to do whatever my lord the king shall choose.'"

This judge, when his court is in disarray, they do not stand before him in their proper order, but in disarray and confusion. Those who should stand to the right stand to the left, and those who should stand to the left stand to the right. But when they see that his court is in order, they stand in their proper order. He began to say, "If my court were in disarray, each one would not stand in his proper order."

He then began to sing. And when was it so, as it is written (2 Samuel 16:32), "And it came to pass, that when David was come to the top of the mount, where he worshipped God"? Rabbi Judah and Rabbi Nehemiah and the Rabbis [differ on this]. One said: Why was he called Hushai the Archite?

Because he was one of David's courtiers. And one said: Because through him, David's kingdom was established. And one said: He was called after the name of his city. And when he saw that his kingdom was established, he began to sing.

And when was it so, as it is written (2 Samuel 17:27), "And it came to pass, when David was come to Mahanaim, that Shobi the son of Nahash...and Barzillai the Gileadite..." Now why was he [Shobi] called Shovi? Rabbi said: Because he restrained his evil inclination for a time. And Rav said: Because he repented.

"And Machir the son of Ammiel of Lo-debar, and Barzillai the Gileadite of Rogelim" - immediately they began to honor him, as it is said (2 Samuel 17:28) "Beds, and basins, and earthen vessels...and wheat, and barley, and flour..." Rav said: "Beds" refers to mattresses and sheets. "Basins" refers to casks of wine. "Earthen vessels" refers to those coming from Rachmah.

"Wheat and barley" as they are [literally]. "Lentils" - Rabbi said: Chick peas and beans. "Parched corn" - as it is [literally]. "Honey and butter" - as they are.

"And sheep, and cheese of kine" - cheese from milk that no fly could stand upon it, but would fall. They brought them to David and the people with him to eat. When David saw this, he began to say: "These are what I was afraid of, but they have made peace with me. It is nothing other than the Holy One, blessed be He, who made peace with me, as it is said (Proverbs 16:7), 'When a man's ways please the Lord, He maketh even his enemies to be at peace with him.'"

He began to say, "A Psalm of David: O Lord, how many are my foes!" It is written (2 Samuel 12:6), "And he shall restore the lamb fourfold." Rabbi Judah son of Hanina said: The Holy One, Blessed be He, said to him: "You committed one adultery? Sixteen adulteries will be committed against you.

You murdered one person? Sixteen murders will be committed against you." "Fourfold" means four times four. Rabbi Joshua said: David said, "O Lord, how many are my foes!"

"If someone else had taken my kingdom, it would have been a great distress for me. If my son had taken someone else's kingdom, it would have been a great distress for me. Now my son has taken my kingdom - 'O Lord, how many are my foes!'" (2 Samuel 16:13) "And David and his men went by the way." But were they to go through the air?

Rather, they went in a humble way. (Ibid.) "And Shimei went along on the hillside." This reminds him of the incident of the side. This is what David said (Psalms 38:18), "For I am prepared for the wound."

And this is what David said to his son Solomon (1 Kings 2:8), "And he reviled me with a grievous curse." It is an acronym for "adulterer, Moabite, wicked, oppressor, abomination." And he said to him (2 Samuel 16:8), "And behold, you are caught by your own evil." What is the meaning of "And behold"?

Rabbi Abba bar Kahana said: The platter of Bathsheba walked before David. (2 Samuel 19:21) "And behold, I am the first this day of all the house of Joseph." Rabbi Samuel bar Nachmani went up from Babylon to ask three things. He found Rabbi Yochanan, the Resh Galusa, and said to him, "What is meant by the verse (Judges 5:7), 'The rulers ceased in Israel'?" Rabbi Yochanan said to him, "The small towns that were destroyed in the days of Sisera, when Deborah arose, became leading communities, as it is stated (Deuteronomy 3:5), 'Besides the unwalled towns, a great many.'"

And he further asked him, "What is meant by the verse (Daniel 9:9), 'To the Lord our God are the mercies and the forgivenesses, for we have rebelled against Him'? Should it not have said, 'For we have kept His Torah'?" Rabbi Yochanan said to him, "It is well written, as it is the way of the world: A laborer who works for a householder faithfully and is given his wages – what good has he done? And when does he acquire merit?

When he does not work for him faithfully, and yet his wages are not withheld from him at all. Therefore, it is written, 'To the Lord our God are the mercies and the forgivenesses, for we have rebelled against Him.'" Rabbi Samuel bar Nachmani said, "Have you ever seen people rebel against a king, and yet he provides them with sustenance? It is written (Psalms 106:19), 'They made a calf in Horeb,' and yet the manna came down for them."

Rabbi Simeon ben Yochai said, "They made thirteen calves, one for each tribe, and one general one for them all, as it is stated (Nehemiah 9:18-26), 'And they committed great acts of provocation.'" And when Rabbi Judah the Levite, the son of Rabbi Shalom, came, he said to him, "Up to this point, Rabbi Berekhiah expounded." His father said to him, "The manna came down for them as far as the Jordan, and they would sacrifice before the calf, and it did not cease, as it states (Ezekiel 16:19), 'And My bread which I gave you, fine flour, and oil, and honey, wherewith I fed you, you have even set it before them for a sweet savor, and thus it was.'"

What is meant by "and thus it was"? That they would sacrifice it before an idol, and the manna would come down for them. Behold, it is well written (Daniel 9:9), "To the Lord our God are the mercies and the forgivenesses." Again he asked him, "What is meant by the verse (2 Samuel 19:21), 'And, behold, I am the first this day of all the house of Joseph to go down to meet my lord the king'?"

Rabbi Jonathan said, "What would you say about it in Babylon?" He said to him, "This is what we say: When Shimei came before David, he said to him, 'Just as Joseph's brothers did evil to him but he repaid them with goodness, so too I have done evil to you, but you should repay me with goodness, like Joseph who repaid his brothers with goodness though they had done evil to him.'" Rabbi Jonathan said to him, "You say well, but listen to a wondrous thing.

What does he [Shimei] say? 'Behold, I am the first this day of all the house of Joseph.' He [Rabbi Jonathan] said to him, "All Israel is called by the name of Joseph, as it is stated (Amos 5:15), 'Perhaps the Lord God of hosts will be gracious unto the remnant of Joseph.'" And Shimei said to David, "All Israel has done evil to you, and I more than all of them.

And all Israel is sitting and waiting to see what you will do - if you accept me, all Israel will come and make peace with you. Hence, 'Behold, I am the first this day [of all the house of Joseph].'" When David saw this, he began to sing, "A Psalm of David: O Lord, how many are my foes!" It is written (2 Samuel 12:6), "And he shall restore the lamb fourfold."

Rabbi Judah son of Hanina said: The Holy One, Blessed be He, said to him, "You committed one adultery? Sixteen adulteries will be committed against you. You murdered one? Sixteen murders will be committed against you."

"Fourfold" means four times four. Rabbi Joshua said: David said, "O Lord, how many are my foes!" "If someone else had taken my kingdom, it would have been a great distress for me. If my son had taken someone else's kingdom, it would have been a great distress for me.

Now my son has taken my kingdom - 'O Lord, how many are my foes!'" "If others had killed my son, it would have been a great distress for me. And if my son had killed someone else's son, it would have been a great distress for me. Now my son has killed me - 'O Lord, how many are my foes!'"

"If someone else had violated my wives, it would have been a great distress for me. If my son had violated someone else's wife, it would have been a great distress for me. Now my son has violated my wives - 'O Lord, how many are my foes!'"