Re: Unify drop-by-OID functions

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Unify drop-by-OID functions
Date: 2020-05-05 23:21:55
Message-ID: CAEudQApy=Jah=bVFHkZYbc5AsePTibk12Z39wuZqPq4oJ3Mv4g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-05-05 23:42:52 Re: Another modest proposal for docs formatting: catalog descriptions
Previous Message Juan José Santamaría Flecha 2020-05-05 22:48:28 Re: PG compilation error with Visual Studio 2015/2017/2019