adrian.klaver@aklaver.com wrote:
set search_path = '';
show search_path ;
search_path
-------------
""
...But still in this case, there is pg_catalog in search path.
Yes but from OP:
« I've confirmed that even a superuser cannot create objects in a "special" schema like "pg_catalog" or "pg_toast". So this gives me a workaround to the limitation that I cannot force the use of fully qualified names by setting a null search_path: I could set the attribute of my subprogram to "pg_catalog". »
So Bryn Llewellyn does not seem to be concerned about that.
Thanks, all, for your replies. I'd assumed that the arguments of "set search_path" had to be SQL names. so I tried "". But that caused an error. I didn't try the ordinary empty string because I'd assumed that, as an illegal SQL name, it would be illegal in "set search_path". Hmm...
I'm slightly troubled by "works right now":
You use the empty string, rather than NULL... it works right now:
But because you experts all recommend it, I'll go with it. It's more expressive of what I mean than is using "pg_catalog".
(I'm assuming that having such an unwritable schema inevitably on the search_path is simply an entirely benign benefit. But it could give a strange message to the reader in my use case.)