David asks god to keep him safe, then says all the good stuff in his life comes from god, as well as all his friends. He vows not to sacrifice to other gods or even to say their names aloud. Praise praise praise. Blah blah blah.
David wants attention again and invites god to examine him for sins. He asks god to keep him as the apple of the eye (v. 8) and keep him safe from the wicked.
A repeat of 22 Samuel.
More praise for the sky, then for god's laws, which are richer than gold and sweeter than honey. I'll take the gold and honey, thanks. He asks god to search his heart for secret sins and purge it.
David asks god to protect his people and make their lives happy. He points out that the wicked put their faith in horses and chariots, but his people put theirs and god. And horses and chariots.