The talmud on Nedarim 39b (English) lists seven things that were created before the world: torah, repentance, Gan Eden, Gehenna, the Throne of Glory, the Temple, and "the name of the mashiach". The proof text offered for this last is Tehillim 72:17. I'm having trouble seeing how that text supports the claim in the g'mara.
The source text is:
יְהִי שְׁמוֹ לְעוֹלָם לִפְנֵי שֶׁמֶשׁ יִנּוֹן שְׁמוֹ וְיִתְבָּרְכוּ בוֹ כָּל גּוֹיִם יְאַשְּׁרֻהוּ:
May his name be forever; before the sun, his name will be magnified, and [people] will bless themselves with him; all nations will praise him.
In context this seems to be pretty clearly talking about Shlomo HaMelekh, the subject of the psalm, and Rashi agrees:
May his name: [May] Solomon’s name be remembered forever for his riches and his wisdom.
before the sun, his name will be magnified: All the days of the sun, his name will be magnified.
The verse begins יְהִי שְׁמוֹ , which to my knowledge usually means "may his name (be something) from this point forward"; it's not an assertion that it's always been so.
The Soncino translation of Nedarim 39b says this (note the editorial insertions):
The name of the Messiah, as it is written, His name [sc. of Messiah] shall endure for ever, and [has existed] before the sun!
Even if we say that the Soncino editor erred (a claim I am not qualified to make, but if it were so), we're left with the original g'mara that thinks this text somehow provides support. How?
How does the g'mara get from a verse about King Solomon to the idea that the mashiach's identity was set before creation? (And secondarily, why a Shlomo reference instead of a David one when we usually talk about the mashiach coming from the house of David?) My Aramaic is not good enough to tease this out from the original text.