Re: set search_path command - Mailing list pgsql-admin

From David G Johnston
Subject Re: set search_path command
Date
Msg-id 1401746452731-5805809.post@n5.nabble.com
Whole thread Raw
In response to set search_path command  (Radovan Jablonovsky <radovan.jablonovsky@replicon.com>)
Responses Re: set search_path command
List pgsql-admin
Radovan Jablonovsky wrote
> Hello,
>
> When we compared behaviour of "set search_path" between 9.1.9 and 9.3.4,
> there is difference. On 9.1.9 the command "set search_path to
> schema1,public" checks if the schema exists and if not it return error.
> Example:
> set search_path to "schema123",public;
> ERROR:  invalid value for parameter "search_path": "schema123, public"
> DETAIL:  schema "schema123" does not exist
>
> On 9.3.4 the same command silently ignore the schema does not exists.
> Example:
> set search_path to "schema123",public;
> SET
>  select * from pg_namespace where nspname ilike '%schema123%';
>  nspname | nspowner | nspacl
> ---------+----------+--------
> (0 rows)
>
> 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.

David J.




--
View this message in context: http://postgresql.1045698.n5.nabble.com/set-search-path-command-tp5805807p5805809.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


pgsql-admin by date:

Previous
From: Vibhor Kumar
Date:
Subject: Re: set search_path command
Next
From: Tom Lane
Date:
Subject: Re: set search_path command