Re: set search_path command

From: Vibhor Kumar <vibhor(dot)aim(at)gmail(dot)com>
To: Radovan Jablonovsky <radovan(dot)jablonovsky(at)replicon(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: set search_path command
Date: 2014-06-02 21:58:42
Message-ID: 57498BFA3C404D6699D939A7B6A1B602@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 "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)

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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message David G Johnston 2014-06-02 22:00:53 Re: set search_path command
Previous Message Radovan Jablonovsky 2014-06-02 21:50:56 set search_path command