upright before him--In my relation to God I have been perfect as to all parts of His law. The perfection does not relate to degree.
mine iniquity--perhaps the thought of his heart to kill Saul (Sa1 24:6). That David does not allude to all his conduct, in all relations, is evident from Psa 51:1, &c.