Re: set search_path command - Mailing list pgsql-admin

From Tom Lane
Subject Re: set search_path command
Date
Msg-id 25656.1401750951@sss.pgh.pa.us
Whole thread Raw
In response to Re: set search_path command  (David G Johnston <david.g.johnston@gmail.com>)
List pgsql-admin
David G Johnston <david.g.johnston@gmail.com> writes:
> Radovan Jablonovsky wrote
>> Is this new behaviour intentional?

> Yes. It was felt the 9.1 behavior was too punishing.  I do not recall the
> specifics at the moment but I believe 9.0- and 9.2+ simply ignore the
> missing schema while 9.1 has the obnoxious behavior that you see.  Though if
> any version other than 9.1 and 9.3 matter you should confirm this for
> yourself.

A quick check says that an interactive "SET search_path = nosuchschema"
command fails in previous versions as well as 9.1.  However, I believe that
noninteractive settings (eg, from postgresql.conf or ALTER DATABASE SET)
have always accepted paths including nonexistent schemas.  This was felt
to be inconsistent; and also, IIRC, in 9.1 or 9.2 we had made some code
refactorings that made it difficult to sustain such inconsistent behavior.
So we decided to go for the laxer behavior in all cases rather than the
stricter behavior in all cases.

Another rationale for this change was the analogy between search_path
and Unix PATH settings.  AFAIK, no Unix-oid platform anywhere will
complain if your PATH mentions a nonexistent directory.

            regards, tom lane


pgsql-admin by date:

Previous
From: David G Johnston
Date:
Subject: Re: set search_path command
Next
From: Scott Whitney
Date:
Subject: Failing replication