Comp. Deuteronomy 32:31, where we see that “rock” was a common term among the tribes of Canaan for their divinities. Notice some trifling variations in Samuel.
Related Commentaries of Psalms 18:31
Psalms 18:31
31 For who is God save the LORD? or who is a rock save our God?