"The desire for [artificial] riches is infinite in a different way than the desire for the highest good, for the more perfectly the highest good is possessed the more it is loved [(amatur)] and other things contemned because the more it is had, the more it is known [(magis cognoscitur)]. Therefore it is said in Ecclesiasticus 24:29, 'They that eat me shall yet hunger.' But in the appetite for riches and any other temporal goods it is the reverse, for once they are had, they [(ipsa)] are contemned and other things desired [(appetuntur)], in keeping with what is said in John 4.13: 'Everyone who drinks of this water will thirst again.' This is so because their insufficiency is known better [(magis cognoscitur)] when they are had. But this reveals their imperfection and that the highest good does not consist of them."
"Aliter tamen est infinitum desiderium divitiarum, et desiderium summi boni. Nam summum bonum quanto perfectius possidetur, tanto ipsummet magis amatur, et alia contemnuntur, quia quanto magis habetur, magis cognoscitur. Et ideo dicitur Eccli. XXIV, qui edunt me, adhuc esurient. Sed in appetitu divitiarum, et quorumcumque temporalium bonorum, est e converso, nam quando iam habentur, ipsa contemnuntur, et alia appetuntur; secundum quod significatur Ioan. IV, cum dominus dicit, qui bibit ex hac aqua, per quam temporalia significantur, sitiet iterum. Et hoc ideo, quia eorum insufficientia magis cognoscitur cum habentur. Et ideo hoc ipsum ostendit eorum imperfectionem, et quod in eis summum bonum non consistit."
Thomas Aquinas, Summa theologiae I-II.2.1.ad 3, as trans. Ralph McInerny (Thomas Aquinas: selected writings, pp. 497-498), italics mine.
My first reaction to this tends to be that given the alia here, Aquinas gets it wrong. For the moment I plug (for example) riches into the formula ("once riches are had, they [(ipsa)] are contemned and things other [(alia)] than riches are desired"), I am reminded that the wealthy miser doesn't want something other than riches, but rather more (cf. the "magis . . . magis" in the sentence preceding). He may want other things, too, but he can't really ever be said to contemn riches in general. Or, at least, not until he has either 1) become infinitely wealthy or 2) seen his way through to the vanity of it all and embraced the highest good (no member of the universe). Yet at that point he will have stepped off the merry-go-'round anyway. I agree that "the more perfectly the highest good is possessed the more it is loved and other things contemned". It's just that I'm not seeing the neatly reverse dynamic at work on the opposite side of the ledger, except on the whole.
So what is Aquinas saying? Is he talking about the way in which we are constantly moving back and forth among finite artificial goods (now riches, now sex, but the next moment riches again, but then human affection, or fame, and so forth), though not in such a way as really ever to contemn any of them definitively? Or is the important contrast the one between the two occurrences of "magis cognoscitur", i.e. its sufficiency on the one hand, and their insufficiency/imperfection (eorum insufficientia/imperfectionem) on the other? Certainly he is saying that we must choose between the infinitude of desire and an infinite (which is to say dynamic) satisfaction.
I must say, by the way, that I am impressed by the fact that Aquinas has balanced John 4:13 with Ecclesiasticus 24:29 Vulgate (has been honest enough to acknowledge the prima facie challenge presented by John 4:14).