Solomon Built the Temple but David's Name Is on It and the Rabbis Say That Is Correct
Psalms attributes the Temple dedication to David even though Solomon built it. The Mekhilta finds in this a principle that runs through Torah: the name belongs to whoever devoted their life to the work.
Table of Contents
Psalms 30 opens with a heading that appears to contain a factual error. "A psalm, a song of the inauguration of the Temple of David." David. But David did not build the Temple. I Kings 6:14 is unambiguous: "And Solomon built the Temple." Solomon did the building. Solomon gave the orders, employed the labor, oversaw the construction. The Temple was finished on his watch.
So why does the Psalm say David?
The Mekhilta DeRabbi Yishmael, a tannaitic commentary on Exodus compiled in the second century CE, addresses this directly in the Tractate Shirah, the section on the Song of the Sea. The passage treats it not as a scribal error but as a theological statement: because David devoted his life to building the Temple, it was called by his name.
David did not get to build it. God told him he was a man of war, that blood was on his hands, and that a man of peace would have to build the house of peace (I Chronicles 22:8). Solomon was that man. But David spent decades preparing. He gathered materials. He acquired the site. He drew up plans. He organized the priests and Levites. He fought wars specifically to secure borders so that the Temple project would have a peaceful context in which to proceed. He devoted himself to the idea of the Temple the way a man devotes himself to a dream he knows he will not live to see completed.
What Psalms 132 Says David Swore
The Mekhilta brings a second text as evidence: Psalms 132. "Remember, O Lord, unto David, all of his tribulation in seeking a place for Your sanctuary, which he swore to the Lord, vowed to the Strength of Jacob: Forefend that I came to the test of my habitation, that I go up on the bed spread out before me, that I give superfluous sleep to my eyes or slumber to my lids, before I find the foreordained place for the Temple of the Lord, the habitation of the Strength of Jacob."
David swore not to sleep comfortably until he found the site for the Temple. Whether or not this vow was literally kept is beside the point. The Psalm records it to describe the quality of David's attention to this project. He treated it as more urgent than his own rest. He treated it as more important than the palace he had already built for himself. The Temple site mattered more to him than his own house.
The Mekhilta notes what comes next in the biblical sequence. I Kings 12:16 records the moment when the northern tribes reject the Davidic monarchy: "See your house, O David." The phrase is a dismissal. But even as they reject his dynasty, the people still call it his house. The name has stuck. The man who could not build the Temple and could not hold the kingdom together permanently still has his name on both, because he devoted himself to both absolutely.
The Eighth Song and Why Solomon's Psalm Is in a List of Ten
The Mekhilta places this discussion of Solomon's Temple in an enumeration of the ten songs sung throughout Jewish history. Elsewhere in the Tractate Shirah, the list runs from the song sung in Egypt on the first Passover night, through the Song of the Sea, through the songs of Moses, Joshua, Deborah and Barak, David, Solomon, Jehoshaphat, and finally the tenth song, which has not yet been sung and which will be sung at the final redemption.
Solomon's is eighth. It is the song of the Temple dedication, Psalms 30, which the Mekhilta has just explained should properly be called the song of David. The placement is deliberate. The songs are arranged chronologically and theologically, with the final redemption still ahead. Solomon's Temple sits in the eighth position, which in Jewish numerology carries the sense of something transcending the natural order, the eighth day beyond the seven of creation, the world beyond the world.
But the tenth song has not arrived yet. The Mekhilta teaches that all previous songs were denominated in the feminine, "zoth," because each past redemption was followed by renewed subjugation, as a woman who gives birth faces the same labor again. The final song will be denominated in the masculine, "zeh," because the redemption it celebrates will not be followed by exile or destruction or defeat. It will be permanent. Solomon's Temple has already fallen twice. David's name is on a building that no longer stands. The tenth song will be sung over something that cannot be taken away.
The Principle That the Mekhilta Draws From All of This
"Whatever a man devotes his life to is called by his name." The same principle appears in the Mekhilta's teaching about Moses, who devoted himself to Torah, to the judges he appointed, and to other institutions that then bore his name in perpetuity. David and Moses become examples of the same truth: dedication earns naming rights.
This is not flattery and it is not sentiment. It is a precision statement about how meaning accrues to human effort. The builder of the Temple gets the credit for building it. The man who gave everything so the Temple could exist gets his name on the dedication. Both things are true at once. Solomon's labor is real. David's devotion is also real. The Psalms, which are never wrong about such things, honor both by giving the credit to the one whose dream the Temple originally was.