Tom Lane wrote:
> I think you can assume that noplace else in the backend will invoke the
> sk_func, period.
Great, thanks for the info.
>>- mark the array that indicates NULLs that is passed to
>>index_formtuple() as 'const', and fix the resulting fallout
>
> I'm a bit dubious about this, mainly because you did not likewise
> const-ify the other input arguments; it seems confusing to do a partial
> const-ification.
Well, "partial const-ification" is the rule rather than the exception in
the backend right now. I'll take a look at adding more const qualifiers,
but I don't really see why "partial const-ification" is confusing.
> The only thing I don't like about this is that it's not apparent that
> the function would close the heap & index relations, so the calling code
> will now look like it's leaking the relation references. Maybe call it
> IndexCloseAndUpdateStats or something like that?
Good point -- I'll make that change.
-Neil