Hier zu Info meine Antwort auf meinen Bug_Report :
This example works as you’re expecting in 9.3 and up, as per this 9.3
release note item:
Force cached plans to be replanned if the search_path changes (Tom Lane)
Previously, cached plans already generated in the current session
were not redone if the query was re-executed with a new
search_path setting, resulting in surprising behavior.
So in previous versions, the function latches onto whichever
company_objects table it sees during its first execution. Although that’s
arguably a bug, we felt it was not safe to change the behavior so
fundamentally in minor releases. 9.2.x will not get changed in this way.
regards, tom lane
grüße Rolf