Rod Taylor <rbt@zort.ca> 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 control paths that we're
talking about here insert or update only one tuple per transaction.
We do *not* want to do (a) open all indexes, (b) process one tuple,
(c) close all indexes in the performance-critical paths where many
tuples are processed per transaction. (Even in the paths that use
CatalogOpenIndexes, you wouldn't reduce it to a single call in
the routines that insert multiple tuples per call.)
regards, tom lane