Updating system catalogs after a tuple deletion

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Updating system catalogs after a tuple deletion
Date: 2001-05-14 08:41:56
Message-ID: ECEHIKNFIMMECLEBJFIGAEINCAAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lincoln Yeoh 2001-05-14 09:24:31 Re: Re: 7.2 items
Previous Message Kovacs Zoltan 2001-05-14 08:38:08 bug in PLPGSQL