Re: [GENERAL] Setting search_path ignored - Mailing list pgsql-general

From Guyren Howe
Subject Re: [GENERAL] Setting search_path ignored
Date
Msg-id 08b4087e-b1a5-471b-9ee5-775893fb296f@Spark
Whole thread Raw
In response to Re: [GENERAL] Setting search_path ignored  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: [GENERAL] Setting search_path ignored
Re: [GENERAL] Setting search_path ignored
List pgsql-general
I logged out and back and did SET ROLE and got the same resullt.

On Oct 2, 2017, 10:06 -0400, David G. Johnston <david.g.johnston@gmail.com>, wrote:
On Mon, Oct 2, 2017 at 7:00 AM, Guyren Howe <guyren@gmail.com> wrote:

CREATE ROLE thing_accessor;

CREATE ROLE

CREATE SCHEMA thing_accessor;

CREATE SCHEMA

covermything=> ALTER ROLE thing_accessor SET search_path=thing_accessor;

ALTER ROLE

covermything=# SET ROLE thing_accessor;

SET

covermything=> SHOW search_path;

   search_path   

-----------------

 "$user", public

(1 row)

 

This seems to contradict all the advice I can find about setting the schema search path.


​Settings associated with roles only take affect at session start/login.   SET ROLE does not cause them to be read/executed.


"Values set with ALTER DATABASE and ALTER ROLE are applied only when starting a fresh database session."

David J.

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: [GENERAL] Setting search_path ignored
Next
From: "David G. Johnston"
Date:
Subject: Re: [GENERAL] Setting search_path ignored