Isaac Morland <isaac.morl...@gmail.com> writes: > I still think the right default is that CREATE FUNCTION stores the > search_path in effect when it runs with the function, and that is the > search_path used to run the function (and don't "BEGIN ATOMIC" functions > partially work this way already?).
I don't see how that would possibly fly. Yeah, that behavior is often what you want, but not always; we would break some peoples' applications with that rule. Also, one place where it's clearly NOT what you want is while restoring a pg_dump script. And we don't have any way that we could bootstrap ourselves out of breaking everything for everybody during their next upgrade --- even if you insist that people use a newer pg_dump, where is it going to find the info in an existing database? regards, tom lane