I wrote:> Hm ... actually, we probably need *both* types of changes if that's> what we believe the state values mean.
After a bit more thinking and experimentation, I propose the attachedpatch.
regards, tom lane