17 “But we Your people”, must be taken generally of all the race of godly and true Christians. “We,” then, whom they thought they had power to destroy, “Your people, and the sheep of your flock:” in order that he that glories may glory in the Lord, “will confess to You for an age.” But some copies have it, “will confess to You for everlasting.” Out of a Greek ambiguity this diversity has arisen. For that which the Greek has, εἰς τὸν αἰῶνα, may be interpreted both by “for everlasting,” and “for an age;” but according to the context we must understand which is the better interpretation.
The sense then of this passage seems to me to show, that we ought to say “for an age,” that is, even unto the end of time. But the following verse after the manner of the Scriptures, and especially of the Psalms, is a repetition of the former with the order changed, putting that before which in the former case was after, and that after which in the former case was before. For whereas in the former case there had been said, “we will confess to You,” instead of the same herein has been said, “We will proclaim Your praise.”
And so whereas in the former case there had been said, “for an age,” instead of the same herein has been said, “for generation and generation.” For this repetition of generation does signify perpetuity: or, as some understand it, it is because there are two generations, an old and a new....But in many places of holy Scriptures we have already made known to you that confession is also put for praise: as in this passage it is, “These words you shall say in confession, 'That the works of the Lord are very good.'” And especially that which the Saviour Himself says, who had not any sin at all, which by repentance to confess: “I confess to You, Father, Lord of heaven and earth, that You have hid these things from the wise and prudent, and hast revealed them to babes.” I have said this, in order that it may be more clearly perceived how in the expression, “We will proclaim Your praise,” the same has been repeated as had been said higher up, “We will confess to You.”
Source: The Enarrations, or Expositions, on the Psalms (New Advent)