Denis Perchine <dyp@perchine.com> writes:
> OK. I see... I just wondering whether it is possible to use index to get the
> maximum...
I think you are right, it's possible to do it that way. The original
code was broken because it didn't check tuple visibility, so I just
copied-and-pasted some other code without thinking very hard. Feel
free to improve it.
regards, tom lane