Unfortunately I don't think these functions are, strictly speaking, mutable.
The first argument to metabib.browse_bib_pivot, integer[], refers to the metabib.browse_entry_def_map IDs. Given that the corresponding entry in metabib.browse_entry_def_map could change between calls, it is not mutable. Those entries may not be likely to change - but if they do, it would require a restart of PostgreSQL to get the change recognized if the functions are marked IMMUTABLE.
I believe metabib.browse_authority_refs_pivot suffers from a similar concern.
Per the PostgreSQL docs:
"""IMMUTABLE indicates that the function cannot modify the database and always returns the same result when given the same argument values; that is, it does not do database lookups or otherwise use information not directly present in its argument list."""
Unfortunately I don't think these functions are, strictly speaking, mutable.
The first argument to metabib. browse_ bib_pivot, integer[], refers to the metabib. browse_ entry_def_ map IDs. Given that the corresponding entry in metabib. browse_ entry_def_ map could change between calls, it is not mutable. Those entries may not be likely to change - but if they do, it would require a restart of PostgreSQL to get the change recognized if the functions are marked IMMUTABLE.
I believe metabib. browse_ authority_ refs_pivot suffers from a similar concern.
Per the PostgreSQL docs:
"""IMMUTABLE indicates that the function cannot modify the database and always returns the same result when given the same argument values; that is, it does not do database lookups or otherwise use information not directly present in its argument list."""