Updating system catalogs after a tuple deletion - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Updating system catalogs after a tuple deletion
Date
Msg-id ECEHIKNFIMMECLEBJFIGAEINCAAA.chriskl@familyhealth.com.au
Whole thread Raw
Responses Re: Updating system catalogs after a tuple deletion  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi guys,

I have an experimental piece of code like this (that tries to remove
pg_relcheck entries):

deleted = 0;
while (HeapTupleIsValid(tup = heap_getnext(rcscan, 0))) {simple_heap_delete(rcrel, &tup->t_self);++deleted;
/* Keep catalog indices current */CatalogOpenIndices(Num_pg_relcheck_indices, Name_pg_relcheck_indices,
 relidescs);CatalogIndexInsert(relidescs, Num_pg_relcheck_indices, rcrel,
tup);CatalogCloseIndices(Num_pg_relcheck_indices,relidescs);
 
}

What do I use instead of the CatalogIndexInsert command to tell the index
that a tuple has been removed?  I don't see an equivalent CatalogIndexDelete
function...

Is there a better way of doing this?

Chris



pgsql-hackers by date:

Previous
From: Kovacs Zoltan
Date:
Subject: Re: bug in PLPGSQL
Next
From: Franck Martin
Date:
Subject: Re: Re: 7.2 items