Hi there!
I followed the discussion about the schema resolution, and I really
think there is need for an early bound (at function definition time)
version of CURRENT_SCHEMA (the first member of search_path)
Avoiding hard-coding of schema names, (and avoiding polluting the actual
users schema) is hard.
My current code generates some plpgsql functions, which need some helper
functions to construct fcolumn lists, query fragments, etc.
These helpers should live in the same schema, IMHO
It is not impossible: I ended up with the following kludge to refer to
functions in the same schema as the calling function.
It involves an extra layer of dynamic SQL, which self-destructs after
use. It is not pretty, but it works.
Example of such a nested dynamic function is attached. (the helper
functions are not included, but they live in the same "compilation unit")
Cheers,
Adriaan van Kessel