From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Guyren Howe <guyren(at)gmail(dot)com> |
Cc: | PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Setting search_path ignored |
Date: | 2017-10-02 14:06:45 |
Message-ID: | CAKFQuwYS6B=s9PTW97PvteZo8nof8kzWW_AdtrWyht7y=GovHA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Oct 2, 2017 at 7:00 AM, Guyren Howe <guyren(at)gmail(dot)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.
https://www.postgresql.org/docs/9.6/static/config-setting.html
"Values set with ALTER DATABASE and ALTER ROLE are applied only when
starting a fresh database session."
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Guyren Howe | 2017-10-02 14:09:36 | Re: Setting search_path ignored |
Previous Message | Melvin Davidson | 2017-10-02 14:06:32 | Re: time series data |