Frank van Vugt <ftm(dot)van(dot)vugt(at)foxi(dot)nl> writes:
> This doesn't seem to make sense to me, can someone explain the rationale
> behind it?
The rationale is "do what the SQL spec says" ;-)
What the spec says is
( S1 > S2 AND NOT ( S1 >= T2 AND T1 >= T2 ) )
OR
( S2 > S1 AND NOT ( S2 >= T1 AND T2 >= T1 ) )
OR
( S1 = S2 AND ( T1 <> T2 OR T1 = T2 ) )
I seem to recall a previous discussion in the PG lists where we
reverse-engineered a plausible explanation of what the standards
committee had in mind when they wrote this, but I don't have time
right now to go looking for it.
regards, tom lane