Verse 1
Psalm 138:1-8. David thanks God for His benefits, and anticipating a wider extension of God‘s glory by His means, assures himself of His continued presence and faithfulness.
I will praise thee with my whole heart — (Compare Psalm 9:1).
before the gods — whether angels (Psalm 8:5); or princes (Exodus 21:6; Psalm 82:6); or idols (Psalm 97:7); denotes a readiness to worship the true God alone, and a contempt of all other objects of worship.
Verse 2
(Compare Psalm 5:7).
thy word above all thy name — that is, God‘s promise (2 Samuel 7:12-16), sustained by His mercy and truth, exceeded all other manifestations of Himself as subject of praise.
Verses 3-5
That promise, as an answer to his prayers in distress, revived and strengthened his faith; and, as the basis of other revelations of the Messiah, it will be the occasion of praise by all who hear and receive it (Psalm 68:29, Psalm 68:31; Isaiah 4:3).
Verse 5
for great is the glory — or, “when the glory shall be great,” in God‘s fulfilling His purposes of redemption.
Verse 6-7
On this general principle of God‘s government (Isaiah 2:11; Isaiah 57:15; Isaiah 66:2), he relies for God‘s favor in saving him, and overthrowing his enemies.
knoweth afar off — their ways and deserts (Psalm 1:6).
Verse 8
God will fulfil His promise.