Re: set search_path command - Mailing list pgsql-admin

From Vibhor Kumar
Subject Re: set search_path command
Date
Msg-id 57498BFA3C404D6699D939A7B6A1B602@gmail.com
Whole thread Raw
In response to set search_path command  (Radovan Jablonovsky <radovan.jablonovsky@replicon.com>)
List pgsql-admin

On Monday, June 2, 2014 at 5:50 PM, Radovan Jablonovsky wrote:

> 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
"setsearch_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)

I think so. It was fixed in 9.2.

E.14.3.1.7. Server Settings

Silently ignore nonexistent schemas specified in search_path (Tom Lane) :
This makes it more convenient to use generic path settings, which might include some schemas that don't exist in all
databases.


Thanks & Regards,
Vibhor Kumar
Blogs:http://vibhork.blogspot.com
http://vibhorkumar.wordpress.com





pgsql-admin by date:

Previous
From: Radovan Jablonovsky
Date:
Subject: set search_path command
Next
From: David G Johnston
Date:
Subject: Re: set search_path command