suggest: change alter user set search_path to raise notice not error

Started by Robert Grabowskiover 22 years ago2 messagesbugs
Jump to latest
#1Robert Grabowski
grabba@env.pl

Hi.

I can't set user's search_path to no exists schema by simple alter
user set ... . I get this message:

test=# CREATE USER test;
CREATE USER
test=# ALTER USER test SET search_path TO noexists;
ERROR: schema "noexists" does not exist

But this is possible by simple trick:
test=# CREATE SCHEMA noexists;
CREATE SCHEMA
test=# ALTER USER test SET search_path TO noexists;
ALTER USER
test=# DROP SCHEMA noexists;
DROP SCHEMA

and search_path for user test looks:
search_path
-------------
noexists
(1 row)

Some times set user's search_path before schema creation is
necessary. I suggest to change error at alter user to notice.

Robert Grabowski

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Robert Grabowski (#1)
Re: suggest: change alter user set search_path to raise notice not error

Robert Grabowski <grabba@env.pl> writes:

Some times set user's search_path before schema creation is
necessary. I suggest to change error at alter user to notice.

I can't imagine why you think that's necessary.

regards, tom lane