> Can you explain use case where you need it?

Sure. You can consider RBTree as a container that always keeps its
elements in sorted order.  Now imagine you would like to write a code
like this:

/* iterate over items in sorted order */
while(item1 = left_right_walk(tree))

  /* another iteration, probably even in different procedure */
  while(item2 = left_right_walk(tree))
    /* ... some logic ... */


Currently you can't do it.

Or maybe you have different objects, e.g. IndexScanDesc's, that should
iterate over some tree's independently somewhere in indexam.c
procedures. Exact order may depend on user's query so you don't even
control it.

Best regards,
Aleksander Alekseev

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to