On Thu, 5 Sept 2024 at 15:41, Andrei Lepikhov <lepi...@gmail.com> wrote: > It seems that the get_extension_oid routine was not modified when the > sys cache was introduced. What is the reason? It may be that this > routine is redundant now, but if not, and we want to hold the API that > extensions use, maybe we should rewrite it, too. > See the attachment proposing changes.
It seems reasonable to make this function use the new syscache. I didn't change any existing code in my original patch, because I wanted to use the syscache APIs directly anyway and I didn't want to make the patch bigger than strictly necessary. But I totally understand that for many usages it's probably enough if the existing APIs are simply faster (on repeated calls). The patch looks fine. But I think get_extension_name and get_extension_schema should also be updated.