Sean Chittenden <[EMAIL PROTECTED]> writes:
> Two reasons come to mind.  First, If you change your search_path to a 
> valid schema that you have no access to and try and look for database 
> objects, you get the impression that its an empty schema and not a 
> schema that you don't have access to.  To prevent this, I changed the 
> behavior of SET search_path so that it validates its input.

You can't actually do that.  In many (most?) situations, the search_path
value is fixed before a backend even starts; if you try to error out
because you don't like the contents, you'll prevent backends from
starting at all.

Also consider the situation where backend A creates, deletes, or changes
the permissions on schemas that are mentioned in backend B's search
path.  In the existing code these cases behave consistently and much
the same as Unix PATH searching does: at all times your effective path
consists of those elements of PATH that actually exist and are readable.

It would be possible to make interactive SET behave differently from the
non-interactive case, but I don't think that would be an improvement in
understandability or usability.  It's certainly not worth doing if the
only argument for changing is the one you give above.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to