Who wrote Ecclesiastes
Whether 'the Preacher, son of David' is Solomon or a later sage writing in his voice.
Ecclesiastes 1:1-2
1The words of the Preacher, the son of David, king in Jerusalem:
2“Vanity of vanities,” says the Preacher; “Vanity of vanities, all is vanity.”
What each tradition says
Rabbinic / Midrashic
Kohelet Rabbah states that Ecclesiastes 1:1 was inspired by the Divine Spirit and written by Solomon, king of Israel. It cites Proverbs 22:29, “Have you seen a man diligent in his labor? He will stand before kings.”
Sefaria 2022 translation, Kohelet Rabbah 1:1 - The Sefaria Midrash Rabbah, 2022 translation — Kohelet Rabbah 1:1 (on Ecclesiastes 1:1)
Rabbinic / Midrashic
Jastrow and Margoliouth state that Ecclesiastes is post-exilic, though its precise date cannot be fixed. They conclude that Solomonic authorship, which few now hold, may be dismissed, because the second king of the dynasty could not have spoken of "all which were in Jerusalem before me."
Morris Jastrow, Jr. and David Samuel Margoliouth, The Jewish Encyclopedia, s.v. 'Ecclesiastes, Book of' (New York: Funk & Wagnalls, 1901-1906) — Section 'Date'
Patristic
According to Gregory Thaumaturgus, these words are spoken by Solomon, the son of David, king and prophet, to the whole Church of God. He calls Solomon a most honoured prince and a prophet most wise above all men.
Gregory Thaumaturgus (attributed), A Metaphrase of the Book of Ecclesiastes (trans. S. D. F. Salmond), in Ante-Nicene Fathers, vol. 6 — Chapter I, opening
Catholic
Gietmann notes that all other witnesses before the sixteenth century favor Solomonic authorship and inspiration. He says Ecclesiastes itself testifies to Solomon through its title, its whole tone, and Ecclesiastes 1:12, and that Ecclesiastes 12:9 expressly calls Qoheleth the author of many proverbs.
Gerhard Gietmann, The Catholic Encyclopedia, vol. 5 (New York: Robert Appleton Company, 1909), s.v. 'Ecclesiastes' — On authorship (the witness of the tradition for Solomon)
Orthodox
Philaret of Moscow lists Ecclesiastes as “also by Solomon.” In this catechism, the book is attributed to Solomon, together with Proverbs and the Song of Songs.
Philaret of Moscow (St Philaret Drozdov), The Longer Catechism of the Orthodox, Catholic, Eastern Church (trans. R. W. Blackmore), in Schaff, The Creeds of Christendom; served at pravoslavieto.com — Question 33 (the books of the Old Testament)
Reformed / Protestant
Matthew Henry says the Preacher was Solomon, for no other son of David was king of Jerusalem. He concealed his name Solomon, peaceable, because of his sin.
Matthew Henry, Commentary on the Whole Bible, Volume III (Job to Song of Solomon) (CCEL) — Exposition of Ecclesiastes 1:1
Evangelical
Wesley’s note says the Preacher was not only a king but also a teacher of God’s people. Having sinned grievously in the eyes of all the world, he felt obliged to publish his repentance and give public warning to all to avoid the rocks on which he had split.
John Wesley, Explanatory Notes upon the Old Testament - Notes on the Book of Ecclesiastes (Wesley Center Online text) — Note on Ecclesiastes 1:1