Peter Pett's Commentary on the Bible
Psalms 51:18-19
A Prayer For The Prosperity of Jerusalem (Psalms 51:18).
The Psalm as it now stands ends with this prayer. It was possibly not a part of the original Psalm, (which was David's written confession), but added when the Psalm became part of public worship. Although if David specifically wrote the Psalm with its use in public worship in mind, he could have included it at the beginning. It was a plea for God to protect Jerusalem, and prosper it, so that it would continue to offer up sacrifices and offerings, and sustain the worship of YHWH. The adding of it also made clear that Psalms 51:16 was not repudiating sacrifices and offerings.
Many see it as added after Jerusalem had been destroyed by the Babylonians, when the walls needed to be totally rebuilt. But against such a suggestion is the thought that we might then have expected the prayer to be for the restoration of the Temple. Building the walls of Jerusalem was not at the time the first priority. The offering of offerings and sacrifices required an altar and a Temple rather than a walled city (Ezra 3). But the prayer for God to ‘build the walls of Jerusalem' could refer to any time after a siege in which parts of the walls had been severely damaged, of which there were a number known to us. Or it could indeed refer to attempts to repair and improve the fortifications after the taking over of the fortress city from the Jebusites (the word for ‘build' means more than just ‘repair'). We know specifically that such improvements took place in the time of Solomon (1 Kings 3:1), and David, with that end in view, may well have established a liturgical prayer for that to prosper. That would then make Jerusalem safe from invaders and ensure continuation of the cult at the Tent set up by David to house the Ark. But it is impossible to be sure.
Do good in your good pleasure to Zion,
Build you the walls of Jerusalem.
Then will you delight in the sacrifices of righteousness,
In burnt-offering and in whole burnt-offering,
Then will they offer bullocks on your altar.
The Psalm, along with other Psalms of David, was probably taken over for public worship in the time of David when David expanded pubic worship in the way that the Chronicler describes. It would then become a Psalm of penitence through which the people expressed their penitence to God for their sins. It could well have been at this stage that this verse was added in order to make the Psalm more expressive of the prayers of the people, or it may be that David was writing the Psalm with public worship in mind from the beginning.
The call is for God to ‘do good' to Jerusalem and ‘build' its walls, so that it would prosper and be kept safe from its enemies. It could refer to any period from David onwards. And the aim was the safe and permanent establishment of the cult of YHWH within its walls. As a consequence of that security God would be able to delight in the sacrifices of righteousness, in burnt offering and whole burnt offering, with bullocks being offered on YHWH's altar, i.e. the one set up in Jerusalem.
‘The sacrifices of righteousness' may well have been called that in contrast with the sacrifices that had previously been offered up by the Jebusite priesthood. They were seen as false sacrifices. This would then point to it having been written in the time of David. Or it may refer to the restoring of the untainted cult after the Exile, the ‘sacrifices of righteousness', offered in purity of worship, being distinguished from the tainted sacrifices offered before the Exile. The ‘burnt offering' (the ‘going up offering') had in mind the time when the sacrifice was being offered up as offerings which ‘go up'. The ‘whole burnt offering' (the ‘completed' or ‘wholly consumed' offering) then indicated the time when the burnt offering was wholly consumed. The one would result in the other. Burnt offerings were offered daily in the Tabernacle and the Temple, and the process would be continual. As one burnt offering was finally consumed, another would replace it. Worship was continual. Or there may have been a technical difference between ‘burnt offerings' and ‘whole burnt offerings' (both are technical terms for ‘whole offerings' in the Hebrew but the latter is only used in respect of offerings on behalf of priests - Leviticus 6:22).