In singing this psalm we must do as David here does (v. 17), praise the Lord according to his righteousness, that is, give him the glory of that gracious protection under which he takes his afflicted people and of that just vengeance with which he will pursue those that afflict them. Thus we must sing to the praise of the Lord most high, who, when his enemies deal proudly, shows that he is above them.