Re: set search_path command

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: set search_path command
Date: 2014-06-02 22:00:53
Message-ID: 1401746452731-5805809.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2014-06-02 23:15:51 Re: set search_path command
Previous Message Vibhor Kumar 2014-06-02 21:58:42 Re: set search_path command