Only as a homework, is this function completely useless?

ItemPointerData
systable_scan_next(Relation heapRelation,
  Oid indexId,
  bool indexOK,
  Snapshot snapshot,
  int nkeys, ScanKey key)
{
    SysScanDesc scan;
HeapTuple htup;
ItemPointerData tid;

    scan = systable_beginscan(heapRelation, indexId, indexOK, snapshot,
nkeys, key);
htup = systable_getnext(scan);
if (HeapTupleIsValid(htup))
        tid = &htup->t_self;
else
        tid = NULL;
    systable_endscan(scan);

return tid;
}

regards,
Ranier Vilela

Reply via email to