Pei He <hepeim...@gmail.com> writes: > What I want to do is, for a given key return the tuples that Index scan can > find, and return the rest tuples by a seq scan. So, I need to know which > tuples have been returned by maintain a bitmap, and to avoid return the same > tuple twice.
> If I can know the offset of a tuple in the order of file scan, then I can > force the seq scan to skip it. As pointed out, "offset" is an unworkable concept here. That's why the tidbitmap code doesn't work with offsets; it works with tids. You don't really need to reinvent this wheel. Go read the bitmapscan code. (One wonders though what you think you are going to save if you have to do a seqscan anyway. Where's the advantage over just doing a seqscan?) regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers