According to biblical tradition, although David bought the land for the Temple and carefully assembled its building materials, he was deemed unworthy of constructing the Temple because he was a man of war with blood on his hands.
David bought the land.
But you'll get a much better feel for the medieval atmosphere of a fortified town, with its ramparts and lookout towers, if you park on the western side, by the church of Saint-Gimer, and walk up around the old Ceteau Comtal.