I'm looking at this open bug again. I attach two commits; the first one
adds two test cases illustrating the current (broken) behavior, and the
second one adds the fix and changes the test cases to match the new
behavior. I spent a lot of time trying to find (a) any other
HeapTupleSatisfiesUpdate caller that needed to be changed, and (b)
additional test cases that showed misbehavior, and so far I haven't been
able to come up with any.
No other test case is affected AFAICS.
I intend to push this and backpatch to 9.3.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services