"Regina Obe" <lr@pcorp.us> writes:
>> You don't really need any new syntax for this particular case, I think.
>> You can declare the function in the extension like this:
>> create function ... set search_path from current;
> But then the search_path would be local variable to the function. Wouldn't
> that impact performance?
Yeah, but it would *work*. Never put performance before functionality.
> We had originally tried that in PostGIS functions (well not that but
> explicitly setting the functions local search path to where postgis is
> installed by adding a search_path variable to the function)
> And things got 10 times slower.
I can imagine that you'd take a noticeable hit for SQL functions that'd
otherwise be inline-able, but I doubt that it makes much difference for
index functions.
regards, tom lane