Re: [HACKERS] Planned simplification of catalog index updates

2002-08-02 Thread Tom Lane
Rod Taylor <[EMAIL PROTECTED]> writes: >> Then the typical call would reduce to >> >> CatalogUpdateIndexes(Relation, HeapTuple); > This would be great. Anyway to take it one step further and make it > transparent? Hide it in heap_insert / update? No, that would be quite inappropriate. The co

Re: [HACKERS] Planned simplification of catalog index updates

2002-08-02 Thread Bruce Momjian
Tom Lane wrote: > This would simplify development/maintenance at the cost of a small > amount of CPU time building the index OID list whenever it wasn't > already cached. (OTOH ... I'm unsure whether opening an index by OID > is any faster than opening it by name, but it's certainly plausible tha

Re: [HACKERS] Planned simplification of catalog index updates

2002-08-02 Thread Rod Taylor
> An even more radical approach is to get rid of the hardwired index name > lists in indexing.h, and instead expect CatalogOpenIndices to make use > of the index OID lists that are maintained by the relcache (since 7.1 or > so). Then the typical call would reduce to > > CatalogUpdateIndexes(

[HACKERS] Planned simplification of catalog index updates

2002-08-02 Thread Tom Lane
I count about seventy occurrences of this code pattern: /* keep system catalog indices current */ if (RelationGetForm(pg_rewrite_desc)->relhasindex) { Relationidescs[Num_pg_rewrite_indices]; CatalogOpenIndices(Num_pg_rewrite_indices, Name_pg_rewrite_indices,