"Qingqing Zhou" <zhouqq@cs.toronto.edu> writes:
> There might be another usage of tid < or >. Consider a heap with one middle
> page is broken, I could save most of my data by doing
> INSERT INTO aa SELECT * FROM a WHERE ctid < '(1000, 1)';
> INSERT INTO aa SELECT * FROM a WHERE ctid > '(1001, 0)';
Well, not really, because the planner won't optimize that, hence will
try to apply the WHERE condition to each row of the table, hence you'll
still bomb on the bad page.
> The above example also proves that <= or >= is not required.
<> is "not required" either since NOT (foo = bar) serves perfectly well.
If we're going to do this I'd vote for putting in all four operators
just to minimize the surprise factor. But I'm not sold that there's
a use case, any more than Neil is.
regards, tom lane