On May 29, 2009, at 2:45 PM, Greg Stark wrote:
> 2) Normally programming languages do early binding so as soon as the
> code is parsed references are resolved. You can't later define a new
> function earlier in the search path and have it take over references
> that have were previously referring to some other function.
Not functions, but see method dispatch.
> Well I think the thinking is that if the extension author wants to
> hide some objects from the public he creates a schema for them and
> references them explicitly.
Agreed.
> If he pushes that private schema onto the search path he'll find any
> functions he calls -- admittedly not that common since we don't have
> any way to do callbacks, i suppose triggers on tables his code
> modifies counts though -- will have this private schema in its search
> path...
Yeah, it'd be nice to lexically scope such search_path modifications,
such as for the duration of a function call.
> If we do want special handling it does seem to me that it would make
> sense to have some token like _private_ which the extension loading
> mechanism would automatically substitute for a unique schema name.
> Otherwise we're relying on extension authors to come up with unique
> names.
Agreed.
Best,
David