Robert Haas <robertmhaas@gmail.com> writes:
> Well, there's something mighty tempting about having a way to say
> "just give me a random sample of the blocks and I'll worry about
> whether that represents a random sample of the rows".
> It's occurred to me a few times that it's pretty unfortunate you can't
> do that with a TID condition.
> rhaas=# explain select * from randomtext where ctid >= '(500,1)' and
> ctid < '(501,1)';
Yeah, as you say that's come up more than once in data-recovery
situations. It seems like it'd be just a SMOP to extend the tidscan
stuff to handle ranges.
Another thing that people sometimes wish for is joins using TIDs.
I think the latter would actually be pretty trivial to do now given the
parameterized-plan infrastructure; I'd hoped to look into it for 9.2 but
ran out of time...
regards, tom lane