Reference for Yevamot 157:13
ואכתי יהושע גזר עלייהו דכתיב (יהושע ט, כז) ויתנם יהושע ביום ההוא חוטבי עצים ושואבי מים לעדה ולמזבח ה' יהושע גזר בזמן שבית המקדש קיים דוד גזר בזמן שאין בית המקדש קיים
might have represented mere public service!<span class="x" onmousemove="('comment',' Not the labour of slaves. [H] perhaps a corruption of the Persian [H] 'day labourer'. Cf. Golds. a.l. and Jast. s.v. [H]. ');"><sup>23</sup></span> — [The deduction,] however, [is made] from the following: And Solomon numbered all the strangers that were in the Land of Israel, etc. And they were found a hundred and fifty thousand etc. And he set threescore and ten thousand of them to bear burdens, and fourscore thousand to be hewers in the mountains.<span class="x" onmousemove="('comment',' II Chron. II, 16f. ');"><sup>24</sup></span> Was it David, however, who issued the decree of prohibition against the nethinim? Moses, surely, issued that decree, for it is written, from the hewer of thy wood to the drawer of thy water!<span class="x" onmousemove="('comment',' Deut. XXIX, 10. Since these were specially singled out they obviously did not form a part of the congregation of Israel, while their services were exactly those which were peculiar to the nethinim or the Gibeonites. ');"><sup>25</sup></span> — Moses issued a decree against that generation only<span class="x" onmousemove="('comment',' Of his own time. ');"><sup>26</sup></span> while David issued a decree against all generations. But Joshua, in fact, issued the decree against them, for it is written, And Joshua made them that day hewers of wood and drawers of water for the congregation, and for the altar of the Lord!<span class="x" onmousemove="('comment',' Josh. IX, 27. ');"><sup>27</sup></span> — Joshua made his decree for the period during which the Sanctuary was in existence<span class="x" onmousemove="('comment',' As it was specifically stated, For the altar (ibid.). ');"><sup>28</sup></span> while David made his decree for the time during which the Sanctuary was not in existence.